Can't compile Linsched on Arch, ld cannot find -lrt and -lpcre
I'm trying to compile Linsched, and keep getting the following error:
Code:
CC UNIX_TEST unix-mcarlo-sim Code:
${UNIX_TESTS}: ${OBJ_FILES} $$@.o Some threads seemed to imply that I need some headers too, and I do have pcre.h under /usr/include, but I don't see why I'd need this just to compile with -lrt and -lpcre. What am I missing here? |
You need headers to define the function parameters for the C compiler so that it knows
how to check for type errors, and improper use of return values. Even then, if your system is a 64 bit system, then you need 64 bit libraries. /lib is for 32 bit libraries, thus the system won't find them unless you are linking a 32 bit binary. /lib64 is for 64 bit libraries... And then you really should put the distribution kit somewhere other than the system directories... things could get damaged during updates to the system. I usually put them in /usr/local, then the /etc/ld.so.conf.d directory would have an entry to refer to /usr/local/lib64 (or lib) so that links can find it. |
I think Arch Linux is pure 64-bit (unless you enable multilib), and I have:
Code:
lib64 -> usr/lib/ By the way I have linked -lrt in my own projects so I know it's there. Just don't understand what's different about this Makefile. My directories are just the Arch Linux defaults, and haven't given me any trouble during the years I've used it. |
Because the -static flag was specified, ld was looking not for .so-files but for librt.a and libpcre.a, which I didn't have.
Since I'm not sure how to get these static versions that I couldn't in the repo, I solved the problem by removing "-static" in the makefile above. |
All times are GMT -5. The time now is 11:23 AM. |