pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Linking SDL2 fails on linux sparc
On Sun, Jul 5, 2020 at 11:03 PM Connor McLaughlan <cont6pro3%gmail.com@localhost> wrote:
>
> Hi,
>
> my system is debian linux on sparc.
> I have a bootstrapped pkgsrc-2020Q1 and also tried a current cvs checkout.
>
> During configure-phase, dlopen is found, i guess this is the pkgsrc-builtin:
>
> checking for dlopen... yes
> checking for dlopen in -lc... no
> checking for dlopen in -ldl... no
> checking for dlopen in -lltdl... no
>
> But during linking i get the following error:
>
> ===> Building for SDL2-2.0.12
> set -e; cd
> /usr/pkgsrc/devel/SDL2/work/SDL2-2.0.12 && cd
> /usr/pkgsrc/devel/SDL2/work/SDL2-2.0.12 && /usr/bin/env
> USETOOLS=no DL_CFLAGS= DL_LDFLAGS= DL_LIBS= PTHREAD_CFLAGS=\ -pthread\
> PTHREAD_LDFLAGS=\ -pthread PTHREAD_LIBS= PTHREADBASE=/usr CC=cc
> CFLAGS=-O2\ -D_FORTIFY_SOURCE=2\ -I/usr/pkg/include\ -I/usr/include\
> -I/usr/pkg/include/libdrm CPPFLAGS=-I/usr/pkg/include\ -I/usr/include\
> -I/usr/pkg/include/libdrm CXX=c++ CXXFLAGS=-O2\ -D_FORTIFY_SOURCE=2\
> -I/usr/pkg/include\ -I/usr/include\ -I/usr/pkg/include/libdrm
> COMPILER_RPATH_FLAG=-Wl,-R F77=f77 FC=f77 FFLAGS=-O LANG=C LC_ALL=C
> LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C
> LC_TIME=C LDFLAGS=-ldl\ -L/usr/pkg/lib\ -Wl,-R/usr/pkg/lib\
> -L/usr/lib\ -Wl,-R/usr/lib LINKER_RPATH_FLAG=-R
> PATH=/usr/pkgsrc/devel/SDL2/work/.cwrapper/bin:/usr/pkgsrc/devel/SDL2/work/.buildlink/bin:/usr/pkgsrc/devel/SDL2/work/.gcc/bin:/usr/pkgsrc/devel/SDL2/work/.tools/bin:/usr/pkg/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/pkg/bin:/usr/pkg/bin
> PREFIX=/usr/pkg MAKELEVEL=0 CONFIG_SITE= PKG_SYSCONFDIR=/usr/pkg/etc
> HOME=/usr/pkgsrc/devel/SDL2/work/.home
> CWRAPPERS_CONFIG_DIR=/usr/pkgsrc/devel/SDL2/work/.cwrapper/config
> CPP=cpp LOCALBASE=/usr/pkg X11BASE=/usr/pkg PKGMANDIR=man
> PKGINFODIR=info PKGGNUDIR=gnu/ MAKECONF=/dev/null OBJECT_FMT=ELF
> USETOOLS=no LIBTOOL="/usr/pkgsrc/devel/SDL2/work/.cwrapper/bin/libtool
> " BSD_INSTALL_PROGRAM=/bin/install\ -c\ -s\ -o\ root\ -g\ root\ -m\
> 755 BSD_INSTALL_SCRIPT=/bin/install\ -c\ -o\ root\ -g\ root\ -m\ 755
> BSD_INSTALL_LIB=/bin/install\ -c\ -o\ root\ -g\ root\ -m\ 755
> BSD_INSTALL_DATA=/bin/install\ -c\ -o\ root\ -g\ root\ -m\ 644
> BSD_INSTALL_MAN=/bin/install\ -c\ -o\ root\ -g\ root\ -m\ 644
> BSD_INSTALL=/bin/install BSD_INSTALL_PROGRAM_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 755 BSD_INSTALL_SCRIPT_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 755 BSD_INSTALL_LIB_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 755 BSD_INSTALL_DATA_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 755 BSD_INSTALL_MAN_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 755 BSD_INSTALL_GAME=/bin/install\ -c\ -s\ -o\
> root\ -g\ root\ -m\ 2555 BSD_INSTALL_GAME_DATA=/bin/install\ -c\ -o\
> root\ -g\ root\ -m\ 664 BSD_INSTALL_GAME_DIR=/bin/install\ -d\ -o\
> root\ -g\ root\ -m\ 775 INSTALL_INFO=
> MAKEINFO=/usr/pkgsrc/devel/SDL2/work/.tools/bin/makeinfo FLEX= BISON=
> PKG_CONFIG=/usr/pkgsrc/devel/SDL2/work/.tools/bin/pkg-config
> PKG_CONFIG_LIBDIR=/usr/pkgsrc/devel/SDL2/work/.buildlink/lib/pkgconfig:/usr/pkgsrc/devel/SDL2/work/.buildlink/share/pkgconfig
> PKG_CONFIG_LOG=/usr/pkgsrc/devel/SDL2/work/.pkg-config.log
> PKG_CONFIG_PATH=
> CWRAPPERS_CONFIG_DIR=/usr/pkgsrc/devel/SDL2/work/.cwrapper/config
> /usr/bin/make -f Makefile
> all
> /bin/bash build-scripts/updaterev.sh
> LTLINK build/libSDL2.la
> /usr/bin/ld: build/.libs/SDL_dynapi.o: in function `SDL_InitDynamicAPI':
> SDL_dynapi.c:(.text+0x3460): undefined reference to `dlopen'
> /usr/bin/ld: SDL_dynapi.c:(.text+0x3478): undefined reference to `dlsym'
> /usr/bin/ld: SDL_dynapi.c:(.text+0x34c4): undefined reference to `dlclose'
> /usr/bin/ld: build/.libs/SDL_sysloadso.o: in function `SDL_LoadObject_REAL':
> SDL_sysloadso.c:(.text+0x8): undefined reference to `dlopen'
> /usr/bin/ld: SDL_sysloadso.c:(.text+0x1c): undefined reference to `dlerror'
> /usr/bin/ld: build/.libs/SDL_sysloadso.o: in function `SDL_LoadFunction_REAL':
> SDL_sysloadso.c:(.text+0x68): undefined reference to `dlsym'
> /usr/bin/ld: SDL_sysloadso.c:(.text+0xc4): undefined reference to `dlsym'
> /usr/bin/ld: SDL_sysloadso.c:(.text+0xd8): undefined reference to `dlerror'
> /usr/bin/ld: SDL_sysloadso.c:(.text+0x12c): undefined reference to `dlsym'
> /usr/bin/ld: build/.libs/SDL_sysloadso.o: in function `SDL_UnloadObject_REAL':
> SDL_sysloadso.c:(.text+0x15c): undefined reference to `dlclose'
> /usr/bin/ld: build/.libs/SDL_x11opengl.o: in function `X11_GL_GetProcAddress':
> SDL_x11opengl.c:(.text+0x610): undefined reference to `dlsym'
> /usr/bin/ld: build/.libs/SDL_x11opengl.o: in function `X11_GL_LoadLibrary':
> SDL_x11opengl.c:(.text+0x79c): undefined reference to `dlopen'
> /usr/bin/ld: SDL_x11opengl.c:(.text+0x7e0): undefined reference to `dlsym'
> /usr/bin/ld: SDL_x11opengl.c:(.text+0x7fc): undefined reference to `dlsym'
> /usr/bin/ld: SDL_x11opengl.c:(.text+0xdd8): undefined reference to `dlclose'
> /usr/bin/ld: SDL_x11opengl.c:(.text+0xf70): undefined reference to `dlerror'
> /usr/bin/ld: build/.libs/SDL_systhread.o: in function `SDL_SYS_CreateThread':
> SDL_systhread.c:(.text+0xf8): undefined reference to `dlsym'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:151: build/libSDL2.la] Error 1
> *** Error code 2
>
> Stop.
>
> So at configure i think it only finds the pkgsrc-internal dopen, but
> later wants to link against the system's dlopen by passing -ldl, which
> fails.
>
> What is possibly going wrong here?
>
> Regards,
> Connor
The solution was to comment out this line in the pkgsrc Makefile:
BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
This allows configure to find libdl and build the package:
checking for dlopen in -ldl... yes
Without BUILDLINK_TRANSFORM removed, the build on debian/sparc64 is
not possible.
Regards,
Connor
Home |
Main Index |
Thread Index |
Old Index