$LINKLIB ssl and $LINKLIB crypto lazarus / 32-Linux ---------------------------------------------------------------------- Ozz_Nixon · 2018-09-21 23:33 Can someone refresh my memory - if I put $LINKLIB in my code, I am linking the .a into my binary - so I should not worry about dependency on another Linux box, right? I dev on Fedora, thus have a newer OPENSSL than my production server (1.0.2m versus 1.0.1p) ... so I thought I would recompile 1.0.2m to have the .a files - link it into my binary and get around it... if it is supposed to work that way, I missed something - as the production server reports /usr/lib64/libssl.10 version_1.0.2 expected (loosely). Project compiles w/o issue on Fedora with or without $LINKLIB. Which brings up the question, when it is linking it into my binary, what obj/dump command shows dependencies? Thanks (been 4 years since I had to recompile this project - notes are vague). Ozz ---------------------------------------------------------------------- guest58172 · 2018-09-22 09:19 I'm interested by this topic. TFPHTTPClient is affected, i don't know what to do about that. https://bugs.freepascal.org/view.php?id=32789 petite pique; - Savez-vous porquoi les Belges aiment la librarie standard de FreePascal ? - Parce que la la librarie standard de FreePascal s'effrite. ---------------------------------------------------------------------- sash · 2018-09-22 09:25 Quote from: ozznixon on September 22, 2018, 01:33:40 amCan someone refresh my memory - if I put $LINKLIB in my code, I am linking the .a into my binary - so I should not worry about dependency on another Linux box, right? Yes, it should link a static library. However, those static libs in turn could have dependencies on other dynamic libs (.so) which could stay unresolved on another machine. To show dynamic library dependencies of executable/other library use ldd: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ldd yourexecutable  linux-vdso.so.1 (0x00007ffe4519b000)  libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f467db98000)  ... ---------------------------------------------------------------------- marcov · 2018-09-22 09:33 Afaik it only passes -lcrypto (etc) to the linker telling it to link that library (though nothing about the form) To force static linking afaik you need -Xt:  -Xt        Link with static libraries (-static is passed to linker) ---------------------------------------------------------------------- Ozz_Nixon · 2018-09-22 12:26 Thanks, the -Xt unveiled that I am also linking pthread, dl, and c. This is a single threaded application, with no support for threading - so how do I find there the pthread logic is coming from? (I am 99% sure I know where, but, it is for mutex - so I may have to refactor the code)... like the libc - that one I am stumped on what is calling anything from libc. I have tried to keep this project libc free. As I only release binaries. ---------------------------------------------------------------------- PascalDragon · 2018-09-22 18:20 You can check your dynamically linked binary whether it requires libc. If it doesn't then it's a dependency of one of the static libraries you link against. Most probably it's the OpenSSL library that requires it...