Compilation PcEm 16

Support and general discussion.
Post Reply
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Compilation PcEm 16

Post by spiderman82 »

:!:

Code: Select all

~/pcem16$ ./configure --enable-release-build --enable-networking --enable-alsa
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether to build for release... yes
checking whether to enable debugging... no
checking whether to enable networking... yes
checking whether to use ALSA for MIDI output... yes
checking for cpu... x86_64
checking for off64_t x86_64... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SDL... yes
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.1.2)
checking for wxWidgets static library... no
checking for snd_pcm_open in -lasound... yes
checking for pthread_create in -lpthread... yes
checking for glGetError in -lGL... no
You need to install the OpenGL library.
Xubuntu 18.04.5, 4.15.0-117-generic
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

The output is telling that you have a problem with the openGL dependency, libGL.

I am not sure which one is currently needed, but here you have a list of possible candidates:
(They should include additional dependencies if they are not already installed)

libgl1-mesa-dev - free implementation of the OpenGL API -- GLX development files
libgles2-mesa-dev - free implementation of the OpenGL|ES 2.x API -- development files
libglvnd-core-dev - Vendor neutral GL dispatch library -- core development files
libglvnd-dev - Vendor neutral GL dispatch library -- development files
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Re: Compilation PcEm 16

Post by spiderman82 »

JosepMa wrote: Tue 15 Sep, 2020 8:43 pm The output is telling that you have a problem with the openGL dependency, libGL.

I am not sure which one is currently needed, but here you have a list of possible candidates:
(They should include additional dependencies if they are not already installed)

libgl1-mesa-dev - free implementation of the OpenGL API -- GLX development files
libgles2-mesa-dev - free implementation of the OpenGL|ES 2.x API -- development files
libglvnd-core-dev - Vendor neutral GL dispatch library -- core development files
libglvnd-dev - Vendor neutral GL dispatch library -- development files

all specified dependencies are installed!!
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

sudo apt install git autoconfig autotools-dev libsdl2-dev libwxgtk3.0-gtk3-dev

from pcem source directory:
autoreconf -i
./configure --enable-release-build
make -j


basically, libsdl2-dev obtains everything needed.

Code: Select all

...
checking pkg-config is at least version 0.9.0... yes
checking for SDL... yes
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.0.4)
checking for wxWidgets static library... no
checking for pthread_create in -lpthread... yes
checking for glGetError in -lGL... yes
checking for alGetError in -lopenal... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Re: Compilation PcEm 16

Post by spiderman82 »

Code: Select all

E: Unable to find package autoconfig
and

Code: Select all

The newest version of autoconf package (2.69-11) is already installed
autoreconf -i

Code: Select all

src/Makefile.am:18: warning: shell $(WX_CONFIG_PATH: non-POSIX variable name
src/Makefile.am:18: (probably a GNU make extension)
src/Makefile.am:65: warning: subst -fpermissive,,$(shell $(WX_CONFIG_PATH: non-POSIX variable name
src/Makefile.am:65: (probably a GNU make extension)
src/Makefile.am:65: warning: shell sdl2-config --cflags: non-POSIX variable name
src/Makefile.am:65: (probably a GNU make extension)
src/Makefile.am:66: warning: shell $(WX_CONFIG_PATH: non-POSIX variable name
src/Makefile.am:66: (probably a GNU make extension)
src/Makefile.am:66: warning: shell sdl2-config --cflags: non-POSIX variable name
src/Makefile.am:66: (probably a GNU make extension)
/usr/share/automake-1.15/am/compile.am: warning: DEFAULT_INCLUDES was already defined in condition OS_WINDOWS, which is included in condition TRUE ...
src/Makefile.am:128: ... 'DEFAULT_INCLUDES' previously defined here
./configure --enable-release-build
make -j

DOES NOT WORK!
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

If you want help, you will need to provide more detailed information.

configure generates a "config.log" file. Please look at it for determining what is going wrong.

The output from autoreconf also happens here, and it's not a problem. (Probably we should improve Makefile.am, to not have those warnings)
Sorry about incorrectly naming "autoconf". I copy&pasted the rest in order to avoid errors, but wrote "autoconfig" manually.

That was on an Ubuntu 18.04 up to date, so really it should be very similar to your system, except if your system is broken in some way.
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Re: Compilation PcEm 16

Post by spiderman82 »

You can check my log file. What specific information do you need about my system?
Attachments
config.log
(17.1 KiB) Downloaded 250 times
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

You had to look for the error, in this case, the error about not finding -lGL:

Code: Select all

configure:5359: checking for glGetError in -lGL
configure:5384: gcc -o conftest -O3   conftest.c -lGL  -lpthread -lasound  >&5
/usr/bin/ld: cannot find -lGL
So the error is that the linker cannot find the specified library, which is libGL.so ( the name of the library comes from prepending lib and ending with .so to the name specified in the -l parameter).

So the next step is finding which debian package includes libGL.so.

To do so, it can be done with the following command (ok, this only works if it is already installed, so it might not help in your case):

Code: Select all

josepma@josepma-VirtualBox:/$ dpkg -S libGL.so
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1
libglvnd-dev:amd64: /usr/lib/x86_64-linux-gnu/libGL.so
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
So from there, libglvnd-dev should provide the file. Let's check if it's really there:

Code: Select all

josepma@josepma-VirtualBox:/$ ls -l /usr/lib/x86_64-linux-gnu/libGL.so
lrwxrwxrwx 1 root root 14 de ma 10  2019 /usr/lib/x86_64-linux-gnu/libGL.so -> libGL.so.1.0.0
So it shows it is a symlink to the file provided by libgl1 package.

And, should that package be already installed?

well, if we follow the following search, we see that including libsdl2-dev should also install libglvnd-dev:

Code: Select all

josepma@josepma-VirtualBox:/$ apt-cache depends libsdl2-dev
libsdl2-dev
  Depèn: libasound2-dev
  Depèn: libdbus-1-dev
  Depèn: libegl1-mesa-dev
  Depèn: libgl1-mesa-dev
  Depèn: libgles2-mesa-dev
  Depèn: libglu1-mesa-dev
  Depèn: libibus-1.0-dev
  Depèn: libmirclient-dev
  Depèn: libpulse-dev
  Depèn: libsdl2-2.0-0
  Depèn: libsndio-dev
  Depèn: libudev-dev
  Depèn: libwayland-dev
  Depèn: libx11-dev
  Depèn: libxcursor-dev
  Depèn: libxext-dev
  Depèn: libxi-dev
  Depèn: libxinerama-dev
  Depèn: libxkbcommon-dev
  Depèn: libxrandr-dev
  Depèn: libxss-dev
  Depèn: libxt-dev
  Depèn: libxv-dev
  Depèn: libxxf86vm-dev
  Entra en conflicte: <libsdl-1.3-dev>
  Reemplaça: <libsdl-1.3-dev>


josepma@josepma-VirtualBox:/$ apt-cache depends libgl1-mesa-dev
libgl1-mesa-dev
  Depèn: mesa-common-dev
  Depèn: libglvnd-dev
  Depèn: libdrm-dev
  Depèn: libx11-dev
  Depèn: libx11-xcb-dev
  Depèn: libxcb-dri3-dev
  Depèn: libxcb-present-dev
  Depèn: libxcb-sync-dev
  Depèn: libxshmfence-dev
  Depèn: libxcb-dri2-0-dev
  Depèn: libxcb-glx0-dev
  Depèn: libxdamage-dev
  Depèn: libxext-dev
  Depèn: libxfixes-dev
  Depèn: libxxf86vm-dev
  Depèn: x11proto-dev
  Entra en conflicte: <libgl-dev>
  Reemplaça: <libgl-dev>
    libgl1-mesa-dev

Note: My system has mawk instead of gawk, and wxwidgets 3.0.4 instead of 3.1.2, but other than that, the rest looks equal.
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Re: Compilation PcEm 16

Post by spiderman82 »

Code: Select all

dpkg -S libGL.so
libgl1:i386: /usr/lib/i386-linux-gnu/libGL.so.1.0.0
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1
libglvnd-dev:amd64: /usr/lib/x86_64-linux-gnu/libGL.so
libgl1:amd64: /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
libgl1:i386: /usr/lib/i386-linux-gnu/libGL.so.1
spider@Upentium:~$ ls -l /usr/lib/x86_64-linux-gnu/libGL.so
lrwxrwxrwx 1 root root 19 сен 26 11:23 /usr/lib/x86_64-linux-gnu/libGL.so -> /usr/lib/libGL.so.1
spider@Upentium:~$ apt-cache depends libsdl2-dev
libsdl2-dev
  Зависит: libasound2-dev
  Зависит: libdbus-1-dev
  Зависит: libegl1-mesa-dev
  Зависит: libgl1-mesa-dev
  Зависит: libgles2-mesa-dev
  Зависит: libglu1-mesa-dev
  Зависит: libibus-1.0-dev
  Зависит: libmirclient-dev
  Зависит: libpulse-dev
  Зависит: libsdl2-2.0-0
  Зависит: libsndio-dev
  Зависит: libudev-dev
  Зависит: libwayland-dev
  Зависит: libx11-dev
  Зависит: libxcursor-dev
  Зависит: libxext-dev
  Зависит: libxi-dev
  Зависит: libxinerama-dev
  Зависит: libxkbcommon-dev
  Зависит: libxrandr-dev
  Зависит: libxss-dev
  Зависит: libxt-dev
  Зависит: libxv-dev
  Зависит: libxxf86vm-dev
  Конфликтует: <libsdl-1.3-dev>
  Заменяет: <libsdl-1.3-dev>
spider@Upentium:~$ apt-cache depends libgl1-mesa-dev
libgl1-mesa-dev
  Зависит: mesa-common-dev
  Зависит: libglvnd-dev
  Зависит: libdrm-dev
  Зависит: libx11-dev
  Зависит: libx11-xcb-dev
  Зависит: libxcb-dri3-dev
  Зависит: libxcb-present-dev
  Зависит: libxcb-sync-dev
  Зависит: libxshmfence-dev
  Зависит: libxcb-dri2-0-dev
  Зависит: libxcb-glx0-dev
  Зависит: libxdamage-dev
  Зависит: libxext-dev
  Зависит: libxfixes-dev
  Зависит: libxxf86vm-dev
  Зависит: x11proto-dev
  Конфликтует: <libgl-dev>
  Заменяет: <libgl-dev>
    libgl1-mesa-dev
Good! And??? :?
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

Been away from the PC for some days.

From that line, I see several things: First, you have 32bit and 64bit versions of the GL library.
Also, your link points to a different place than mine, which you should also check where does it point to.
User avatar
spiderman82
Posts: 16
Joined: Wed 31 Aug, 2016 9:15 am

Re: Compilation PcEm 16

Post by spiderman82 »

What line?
JosepMa
Posts: 202
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Compilation PcEm 16

Post by JosepMa »

Are you a linux user? I mean... I ask because you USE a linux OS, you know?

You found difficulties trying to compile PCem and I have been giving you hints on what to look for so that you can work your way into compiling it.
Now it's almost one month later and looks that you're still in the same place.

I could have worded my previous post better, but it is still easy to understand, if you know the words.
What line? Well, the line that says "libgl1:i386" ( i386 means 32bits, amd64 means 64bits).
What link? When doing an ls -l, the long listing shows extended information, including the modes ( in this case, it starts with an "l" that means soft link) and since it is a link, it shows the target ( i.e. everything after "->" ).

Is my earlier post clearer now? Do you understand that if the linker cannot find or use the library, it is probably because it cannot find or use the file that it needs?

Maybe, in your case, if you force reinstall the "libglvnd-dev:amd64" package, it might fix the incorrect link:

Code: Select all

sudo apt-get install --reinstall libglvnd-dev

Just for the record: linux is not my main OS, but I know linux because I've been experimenting with it since Red Hat Linux 5 (not RHEL) back in late 90's, Debian since sarge (3.1) and even I still have the first Ubuntu (5.04) on CDROM (and SUSE Linux Professional 8).
Post Reply