Lazarus

Free Pascal => General => Topic started by: comingnine on August 13, 2018, 04:31:46 pm

Title: How to fix linklib internal error 200603061 ?
Post by: comingnine on August 13, 2018, 04:31:46 pm
I am trying to to compile PCRE 8.42 with MinGW.nuwen (https://nuwen.net/mingw.html) on Windows 10 x64, and then link it with linklib with trunk FPC (in trunk Lazarus). However, the compiler complains Internal Error 200603061, which means "{ Only debug sections are allowed to have relocs pointing to unused sections }" according to this page (https://github.com/graemeg/freepascal/blob/master/compiler/ogcoff.pas). I am wondering how to correct this behavior ? Is there some GCC switch I could do to workaround ? Many thanks !
Title: Re: How to fix linklib internal error 200603061 ?
Post by: comingnine on September 08, 2018, 02:15:11 pm
The library files (binary libraries and the batch file to rebuild) can be downloaded online (https://mega.nz/#!18JjmCJL!CrqmgRnImFs-0NoWoNl88tJMpliuHH9vs6od-J1R_1Q). The batch file is also included in the attached file. To rebuild the library files with the batch file, one has to download pcre-8.42.zip from the official website, install the MinGW-w64 distribution, and modify the path in the batch file.

Could you help to check and suggest how to solve the internal error 200603061 ?
Title: Re: How to fix linklib internal error 200603061 ?
Post by: corpsman on October 22, 2021, 09:19:12 am
Hello, i have had the same compiler warning / error, with custom c code that i have under my control.

When compiling the c-code in 32-Bit mode everything went fine and include is perfect (no error message), in x64 Bam.

Today i revisited my code and give it a new try, this time my gcc compiler gave me in x64 mode the following error message:
Quote
duplicate symbol .refptr.c_index in modules Byte_handler.o and COMState.o
after some googeling and rewriting the code i was able to eliminate the error message (which is more or less telling that i have double references of c_index, which was not the case, but there was an header file which had "extern const uint8_t c_index;" in it, that is eval anyway's  >:D )

=> Now i am able to include my precomiled c-code in x32 and x64 FPC without any error messages  :D
Title: Re: How to fix linklib internal error 200603061 ?
Post by: marcov on October 22, 2021, 10:47:44 am
Trying with the external (LD) linker instead of the internal might also be something to try when you have problems with certain libraries. This is the parameter -Xe.

My experiences with the internal linker are generally better though. 
TinyPortal © 2005-2018