[SOLVED] what we gone do with the exec_w_objfile_not_found message? lazarus / 64-FPC development ---------------------------------------------------------------------- Key-Real · 2024-07-20 08:21 ./compiler/link.pas (line 272) we have: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    found:=FindFile(s,exepath,false,foundfile);  if not(cs_link_nolink in current_settings.globalswitches) and (not found) then         Message1(exec_w_objfile_not_found,s);  this tells us, we get the warning: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Warning: Object libgte.a not found, Linking may fail ! its because he search in the exe path. Now I specify -Fl./path/ but this has no effect on the message. Should we change this behavior in the source? ---------------------------------------------------------------------- TRon · 2024-07-20 09:25 Hi key-real: Dunno in what state the linker support is and it is a longshot but have you tried passing -k--library-path=searchdir instead of using -Fl ? Do you have all the linker control scripts present as well for your cross-compiler/utils ? Usually you can pass along other options to the linker with the -k option as well in order to obtain more detailed output. ---------------------------------------------------------------------- Key-Real · 2024-07-20 09:32 It is not the part of my linker. Its a warning generated of FPC before my linker is envoked. the -Fl option passes me the lib search dir and it works, so I can call ld. ---------------------------------------------------------------------- Key-Real · 2024-07-20 09:41 correction: ./compiler/linker.pas (line 243): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if pos('.',s)=0 then         s:=s+target_info.objext;                                      <---- he searchs only for .o files not for .a (target_info.staticlibext)        { find object file           1. output unit path           2. output exe path           3. specified unit path (if specified)           4. cwd           5. unit search path           6. local object path           7. global object path         8. exepath (not when linking on target)          for all finds don't use the directory caching }        found:=false;        if isunit and (OutputUnitDir<>'') then          found:=FindFile(s,OutPutUnitDir,false,foundfile)        else          if OutputExeDir<>'' then            found:=FindFile(s,OutPutExeDir,false,foundfile);        if (not found) and (unitpath<>'') then         found:=FindFile(s,unitpath,false,foundfile);        if (not found) then         found:=FindFile(s, CurDirRelPath(source_info),false,foundfile);        if (not found) then         found:=UnitSearchPath.FindFile(s,false,foundfile);      if (not found) then         found:=current_module.localobjectsearchpat h.FindFile(s,false,foundfile);        if (not found) then         found:=objectsearchpath.FindFile(s,false,foundfile);        if not(cs_link_on_target in current_settings.globalswitches) and (not found) then         found:=FindFile(s,exepath,false,foundfile);      if not(cs_link_nolink in current_settings.globalswitches) and (not found) then         Message1(exec_w_objfile_not_found,s); ---------------------------------------------------------------------- TRon · 2024-07-20 10:07 Quote from: Key-Real on July 20, 2024, 11:32:08 amIt is not the part of my linker. I see (had a look at your github). In that case I am unable to provide any meaningful help simply because I lack the knowledge on how to implement a (custom) linker for FPC. BTW and fwiw I see that you are making your changes at your github in main/trunk (which is probably fine at this stage) but realize that it is much easier to have a separated branch where you make your changes (small steps) in order to create MR's to be accepted by the FPC team in case you wish to do so ? ---------------------------------------------------------------------- Key-Real · 2024-07-20 10:17 Quote from: TRon on July 20, 2024, 12:07:11 pmBTW and fwiw I see that you are making your changes at your github in main/trunk (which is probably fine at this stage) but realize that it is much easier to have a separated branch where you make your changes (small steps) in order to create MR's to be accepted by the FPC team in case you wish to do so ? I'm writing a step by step doc to create a FPC Wiki entry with the full explanation how to build a crosscompiler. So finally I gonna put everything together on an own brunch. ---------------------------------------------------------------------- ccrause · 2024-07-20 10:21 I do not think there is a problem in the common fpc source, it works on many other systems.  It may help if you show the full compiler command line that results in this error, also the full path to the library you are linking to.  Lastly, this error is in FindObjectFile but you are specifying a static library.  How did you specify the library (compiler command line, {$linklib })? ---------------------------------------------------------------------- Key-Real · 2024-07-20 10:23 Its not en error. It's just not checked there for .a. I do {$L myLib.a} ---------------------------------------------------------------------- Key-Real · 2024-07-20 10:25 btw: on the PC Linux Target I got: .... Linking FlyTracker Warning: "crtbeginS.o" not found, this will probably cause a linking failure Warning: "crtendS.o" not found, this will probably cause a linking failure 117041 lines compiled, 3.5 sec, 3198640 bytes code, 2287872 bytes data compiling a big prog. ---------------------------------------------------------------------- Seenkao · 2024-07-20 15:19 https://github.com/OpenDriver2/PsyCross look here. ---------------------------------------------------------------------- Key-Real · 2024-07-28 19:25 As I was told to link the system unit against the psy-q-sdk I moved the .a file link list to the linker script. No I do not have this issue any more thx