Menu

Which is the correct options?

Help
dwzgocl0
2022-09-21
2022-09-23
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    How would me vpc.bat should be? Supposed I'm on Windows 64 bit (hence AMD64) and I will not use any of the AVX variants so I won't need NASM. But it seems there is a bug. Even if -cpuAMD64 is specified, it still asking for NASM to be installed and will use NASM. I want to use just GNU AS.

    The only changes I made to vpc.bat is replacing -cpugnuP4 with -cpuAMD64. But for unknown reasons the compilation is always invoking NASM and always error with relocation and symbols not found. From my days as a C developer it's the symptom of missing library to the linker reported such error.

    I have a closer look at the gcc command vpc invoked that printed on the screen. Did you got it wrong? It should be rtl.o, not rtl.c, you are telling it to link with a C source file so the symbols from rtl.o are missing and it error. As I don't know Java and don't know how to build the project from source I can only reach you for help.

     
    • Paul Cockshott

      Paul Cockshott - 2022-09-23

      Here is my email address. william.cockshott@glasgow.ac.uk

      Up to about 12 years ago an effort was put in, with my students to maintain windows compatibility. We generally, at that point used the djgpp version of gcc for compatibility.
      With the obsolescence of that subsystem under windows, it has not been worth putting an effort into it.
      The more modern WSL subsystem now supports a purely Linux based toolset so there is no need to differentiate between windows and Linux.

      I am no longer teaching here so I do not have students to put in effort to maintain things. My own effort is directed at making the system work on other Linux architectures.

      There are a lot of obsolete architectures still in the system which should probably be cleaned out – all the 32 bit compiler targets for a start.

       
    • Paul Cockshott

      Paul Cockshott - 2022-09-23

      The use of rtl.c is deliberate.
      It enables us to avoid having to have separate jar/zip release files for different architectures which we would have to do if we distributed .o files.

       
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    @paulcockshott The faulty command is here:

    gcc -g -no-pie -lm -o test\test p.o C:/mmpc/rtl.c -DPTW32

    You are telling it to link with a C source file! The correct is rtl.o. This is just a typo of yours.

     
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    This is currently my vpc.bat:

    @echo off

    java -Xmx800m -Dmmpcdir=%mmpcdir% -jar %mmpcdir%\mmpc.jar %1 -o%1.exe -U -DPTW32 -opt0 %2 %3 %4 %5 %6 %7 %8

    I removed -cpugnuP4 as it will default to -cpuAMD64 anyway so don't need to specify it. I also removed -felf as I think it's nonsense on Windows. ELF format is of Linux and I have no idea if Windows supports it or not.

     
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    It seems I was wrong about rtl.c and rtl.o, but the problem is still there. Please help.

     
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    I think I should stop guessing it and waiting for your help. I'm not good C programmer either. I found C is hard so I go for Pascal. This is the full error message:

    Glasgow  Pascal Compiler (with vector exensions)
    system is up to date
    
     4                               
     6                               
    Generating parallelism analysis to test\test.lis
    
     6 generated                              compiled
    nasm -f elf64 -lasm.lst  -g -o p.o p.asm
    gcc -g -no-pie -lm -o test\test p.o   C:/mmpc/rtl.c -DPTW32
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:p.asm:23: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:p.asm:36: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:p.asm:43: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:p.asm:51: undefined reference to `_readline'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:18: undefined reference to `_getmem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:414: undefined reference to `_getmem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:708: undefined reference to `_freemem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:912: undefined reference to `_getmem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:933: undefined reference to `_getmem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1704: undefined reference to `_freemem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1715: undefined reference to `_freemem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1747: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1759: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1769: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1780: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1790: undefined reference to `_printchar'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1836: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1939: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1962: undefined reference to `_real2str'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:1973: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2015: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2023: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2031: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2072: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2128: undefined reference to `_getmem'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:2533: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3374: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3385: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3396: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3645: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3656: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3663: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3673: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3684: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3691: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3706: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3756: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3763: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3770: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3781: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3791: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3801: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3811: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3821: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3831: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3838: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3879: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3886: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3893: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3904: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3914: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3924: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3934: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3944: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3954: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3961: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:3999: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4006: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4013: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4024: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4034: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4044: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4054: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4064: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4074: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4081: undefined reference to `_println'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4118: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4129: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4139: undefined reference to `_printint'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4172: undefined reference to `_pascalexit'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4208: undefined reference to `_printchar'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4265: undefined reference to `_csrand'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:4289: undefined reference to `_ctimes'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5362: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5575: undefined reference to `_cstringcompare'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5852: undefined reference to `_setcmprtl'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5894: undefined reference to `_setcmprtl'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5927: undefined reference to `_setcmprtl'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:5962: undefined reference to `_setcmprtl'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6029: undefined reference to `_blockread'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6043: undefined reference to `_setiores'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6075: undefined reference to `_blockwrite'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6090: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6101: undefined reference to `_printstring'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6108: undefined reference to `_pascalexit'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6135: undefined reference to `_printchar'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6145: undefined reference to `_printchar'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6261: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6268: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6278: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6394: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6456: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6464: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6472: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6484: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6499: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6558: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6582: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6705: undefined reference to `_length'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6734: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6789: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6797: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6805: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6828: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6843: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6855: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6863: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6871: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6906: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:6995: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7003: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7011: undefined reference to `_stringappend'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7019: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7145: undefined reference to `_parampntr'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7165: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7174: undefined reference to `_cstringassign'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7195: undefined reference to `_u2asciitrunc'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7477: undefined reference to `_cmemset'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7496: undefined reference to `_crand'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7685: undefined reference to `_valr'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7707: undefined reference to `_vali'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:7729: undefined reference to `_vald'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:8134: undefined reference to `_setchan'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: p.o:./systemAMD64.asm:8142: undefined reference to `_setchan'
    ERROR>/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/ADMINI~1/AppData/Local/Temp/ccpM5OIw.o: in function `main':
    ERROR>/cygdrive/c/mmpc/C:/mmpc/rtl.c:1012: undefined reference to `Pmain'
    ERROR>p.o:C:/mmpc/AMD64macros.asm:31:(.stab+0x14): relocation truncated to fit: R_X86_64_32 against `.text'
    ERROR>p.o:C:/mmpc/AMD64macros.asm:47:(.stab+0x20): relocation truncated to fit: R_X86_64_32 against `.text'
    ERROR>p.o:C:/mmpc/AMD64macros.asm:49:(.stab+0x2c): relocation truncated to fit: R_X86_64_32 against `.text'
    ERROR>p.o:C:/mmpc/AMD64macros.asm:56:(.stab+0x38): relocation truncated to fit: R_X86_64_32 against `.text'+5
    ERROR>p.o:C:/mmpc/AMD64macros.asm:62:(.stab+0x44): relocation truncated to fit: R_X86_64_32 against `.text'+a
    ERROR>p.o:C:/mmpc/AMD64macros.asm:66:(.stab+0x50): relocation truncated to fit: R_X86_64_32 against `.text'+f
    ERROR>p.o:C:/mmpc/AMD64macros.asm:72:(.stab+0x5c): relocation truncated to fit: R_X86_64_32 against `.text'+13
    ERROR>p.o:C:/mmpc/AMD64macros.asm:75:(.stab+0x68): relocation truncated to fit: R_X86_64_32 against `.text'+15
    ERROR>p.o:C:/mmpc/AMD64macros.asm:79:(.stab+0x74): relocation truncated to fit: R_X86_64_32 against `.text'+19
    ERROR>p.o:C:/mmpc/AMD64macros.asm:85:(.stab+0x80): relocation truncated to fit: R_X86_64_32 against `.text'+1b
    ERROR>p.o:p.asm:10:(.stab+0x8c): additional relocation overflows omitted from the output
    ERROR>collect2: error: ld returned 1 exit status
    compilation failedjava.lang.Exception: linking failed
    
     
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    As you see, there are indeed two problems. First, the symbols of the RTL are not available, hence undefined reference. Second, the output by NASM seems incompatible with GNU AS and GNU LINKER, hence the relocation truncated error.

     
  • dwzgocl0

    dwzgocl0 - 2022-09-21

    I did try make all and it successfully built rtl.o and rtlb.o, but it doesn't solve the problem.

     

    Last edit: dwzgocl0 2022-09-22
  • dwzgocl0

    dwzgocl0 - 2022-09-22

    After moving test.pas to the same directory as other files (now everything is in %mmpcdir%), the problem about RTL symbols not found disappeared. But the relocation truncated error is still there.

     
  • dwzgocl0

    dwzgocl0 - 2022-09-22

    Look at the command sent to nasm:

    nasm -f elf64 -lasm.lst -g -o p.o p.asm

    @paulcockshott I know you developed mainly on Linux but you shouldn't hardcode this command. It makes no sense to generate elf64 format on Windows isn't it? It seems you don't check this mailing list either. How could I contact you? So far there is no answers from you.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.