I have been tring to build Lazarus from FPC320 (from snapshots) but hit a strange linking issue. I can build a simple helloworld type pascal programme but trying to build Lazarus fails to link because it cannot find libX11. So I added a -Fl to fpc.cfg, its in /usr/lib/x86_64-linux-gnu/ I also added a -k to be passed directly to ld, that it should search that directory. One or both should work ....
......
(9022) Compiling resource ../units/x86_64-linux/qt5/lazarus.or
(9015) Linking ../lazarus
/usr/bin/ld: cannot find -lX11
/home/dbannon/Lazarus/lazarus_2_0_6/ide/lazarus.pp(165,1) Error: (9013) Error while linking
dbannon@U1910-test:~/Lazarus/lazarus_2_0_6$ ls -l /usr/lib/x86_64-linux-gnu/libX11.so.6
lrwxrwxrwx 1 root root 15 Nov 11 18:15 /usr/lib/x86_64-linux-gnu/libX11.so.6 -> libX11.so.6.3.0
dbannon@U1910-test:~/Lazarus/lazarus_2_0_6$ grep x86_64-linux-gnu /etc/fpc.cfg
-Fl/usr/lib/gcc/x86_64-linux-gnu/9
-Fl/usr/lib/x86_64-linux-gnu
-Fl/usr/lib/gcc/x86_64-linux-gnu/9
-Fl/usr/lib/x86_64-linux-gnu
-k-L/usr/lib/x86_64-linux-gnu
So, I added a specific linker line that points straight to libX11, hey, it cannot ignore that said I.
dbannon@U1910-test:~/Lazarus/lazarus_2_0_6$ grep libX11.so.6 /etc/fpc.cfg
-k-l/usr/lib/x86_64-linux-gnu/libX11.so.6
......
lazres.pp(361,7) Note: Call to subroutine "function GetDebugLogger:TLazLogger;" marked as inline is not inlined
Linking ./lazres
/usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libX11.so.6
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
While failing at a different spot, lazres does not need X11 I guess, its still failing because it cannot find libX11 but its there !
Any suggestions please ?
Davo