"undefined reference to `dlsym" (and dlopen) when building wine

Questions about Wine on Linux
Locked
kromak
Level 2
Level 2
Posts: 20
Joined: Mon Dec 23, 2019 2:56 pm

"undefined reference to `dlsym" (and dlopen) when building wine

Post by kromak »

Hello. I am trying to build wine from the source. The command I am passing to configure at the moment it is:

Code: Select all

CPPFLAGS="-I/media/34GB/Arquivos-de-Programas-Linux/Alsa-1.0.17/include/ -I/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/include/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xorgproto-2018.1/include/" LDFLAGS=-L/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/lib  ./configure
config.log says:

Code: Select all

configure:7272: gcc -m32 -o conftest -g -O2 -I/media/34GB/Arquivos-de-Programas-Linux/Alsa-1.0.17/include/ -I/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/include/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xorgproto-2018.1/include/ -L/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/lib conftest.c -lX11  >&5
/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/lib/libX11.so: undefined reference to `dlsym'
/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/lib/libX11.so: undefined reference to `dlopen'
collect2: error: ld returned 1 exit status
I just compiled a 32bit libX11 (and its required libs). The command I used to do so it is:

Code: Select all

CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32
 ./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/X11-1.4.4/  
 --host=i386-gnu-linux PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/xorg/Xorgproto-2018.1/share/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xtrans-1.0.0/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/Xcb-1.7/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/xorg/Pthread-stubs-0.1/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux-32bit/xorg/Xau-1.0.0/lib/pkgconfig/
I wonder if the problem is caused by the way I built it, specially the use of the environment variables + the host parameter. Some threads on the internet mention that this might be caused by the gcc version. Mine it is 4.9.4.
Locked