Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: dwm, xorg and --disable-static (Read 712 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

dwm, xorg and --disable-static

Hi! I've tried to compile dwm statically, but the linker fails when it gets -static option (without this option everything compiles successfully)
Linker says:
Code: [Select]
/bin/ld: cannot find -lX11
/bin/ld: cannot find -lXinerama
/bin/ld: cannot find -lfontconfig
/bin/ld: cannot find -lXft
collect2: error: ld returned 1 exit status
make: *** [Makefile:26: dwm] Error 1
So I figured out that all xorg soft was compiled with --disable-static option. Is there some easy way to get the .a files of these libraries? I've tried to compile libx11 without --disable-static option, but no libx11.a file was appeared.  Perhaps I need to compile all the libraries on which the libraries I need depend, but there are a lot of them.
I don't know if compiling xorg-server will help, but my attempt to do it failed as I could not find the programs I needed from the makedeps section of the PKGBUILD (like xf86driproto and others)
Maybe there is a manual on how to compile the whole xorg?

Re: dwm, xorg and --disable-static

Reply #1
 Pacman is completely orthogonal to the issue.  Arch just generally does not package static libraries.  If you need to do any static linking, then rebuilding any (and all) libraries you need to staticly link to is the right approach.

All static libs are remove during build. Archlinux using only shared libs.

Re: dwm, xorg and --disable-static

Reply #2
I found this. 2013 was a great cleanup from static libs - https://archlinux.org/todo/remove-static-libraries/:
"We are adding options = ('! Staticlibs') as the default to our makepkg.conf. A few packages genuinely need their static libraries, so these need options = ('staticlibs') added to their PKGBUILDs. Those that do not need their static libraries can be rebuilt once a new devtools release is made."

so you need rebuild more as one package.... but mixing static and dynamic shared libs is good way to broke your system 8)

you was warned :D :D

Re: dwm, xorg and --disable-static

Reply #3
Oh thank you sir! You helped me. Now I can get static libraries 8)  ;D