Maybe the actual failure is that it should be -Wl,-R/usr/X11R7/lib ? That seems done one the same line with "-Wl,-R/usr/pkg/lib".
On the other hand, some dumb questions: Which linker is used? Does it support -R? Does /usr/X11R7/lib exist? Does LD_LIBRARY_PATH help? If so, you could perhaps add /usr/X11R7/lib to global search path in /etc/ld.so.conf or /etc/ld.so.conf.d? (This affects everything on the system, but maybe that's good enough?) On Sat, Aug 5, 2017 at 10:26 AM, Riccardo Mottola < [email protected]> wrote: > Hi, > > on a NetBSD system where I extra use clang instead of standard gcc, I have > issues building back. > In specific, I noticed when building the xlib backend, but the issue is > generic, but I did not notice with cairo because it does not link directly > to certain X libraries, so it went unnoticed. > > To run sucessfully, I need this > -Wl,-R/usr/X11R7/lib > > so that e.g. Xcursor and other libraries gets found on runtime. > > However our configure file generates in config.make this: > > GRAPHIC_LIBS=-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lXft -lfontconfig > -L/usr/X11R7/lib -lXcursor -lXfixes -lXmu -lXt -lXext -lX11 -lGL > GRAPHIC_CFLAGS=-D_REENTRANT -I/usr/pkg/include > -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include > -I/usr/pkg/include/freetype2 -I/usr/X11R7/include -I/usr/X11R7/include > GRAPHIC_LFLAGS= > X_PRE_LIBS= -lSM -lICE > > everything compiles and links, but on run I get unresolved shared objects > which are in /usr/X11R7/lib > > This is all done in configure, but where? > > One explanation I found is that it is done automatically and that the > configure check is bad. > I found this in config.log: > > configure:3659: checking for X > configure:3848: result: libraries /usr/X11R7/lib, headers > /usr/X11R7/include > configure:3868: checking whether -R must be followed by a space > configure:3884: clang -o conftest -g -O2 -I/System/Library/Headers > -I/usr/pkg/include -L/System/Library/Libraries/gnu-gnu-gn > u -L/System/Library/Libraries -Wl,-R/usr/pkg/lib -L/usr/pkg/lib > conftest.c -R/usr/X11R7/lib >&5 > clang: warning: argument unused during compilation: '-R/usr/X11R7/lib' > configure:3884: $? = 0 > > then this is used: > > configure:3901: clang -o conftest -g -O2 -I/System/Library/Headers > -I/usr/pkg/include -L/System/Library/Libraries/gnu-gnu-gn > u -L/System/Library/Libraries -Wl,-R/usr/pkg/lib -L/usr/pkg/lib > conftest.c -R /usr/X11R7/lib >&5 > clang: warning: argument unused during compilation: '-R' > /usr/X11R7/lib: file not recognized: File format not recognized > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > > the warning is interpreted as failure, the error too and so neither option > is added. > > This is actually a linker directive passed to through the compiler, right? > > The check itself is apparently useless for us, since only certain > compilers require a space after -R (cited is Sun) and since we require > Objective-C, to my knowledge we can use only clang or gcc as of now (and > the past 15 years?) > > Riccardo > > _______________________________________________ > Gnustep-dev mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnustep-dev >
_______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
