Can't compile pcem-git on Arch Linux

Support and general discussion.
Post Reply
yataghan012
Posts: 5
Joined: Sat 08 Jan, 2022 4:25 pm

Can't compile pcem-git on Arch Linux

Post by yataghan012 »

I've been having errors at compiling this last month and unable to install. I had it installed and working before but stopped working and tried re-installing with no luck.

Meson-log.txt:

Build started at 2022-04-07T19:17:39.830064
Main binary: /usr/bin/python
Build Options: -Duse-alsa=true -Duse-plugin-engine=true -Duse-networking=true -Dprefix=/usr -Dsysconfdir=/etc -Dbuildtype=release
Python system: Linux
The Meson build system
Version: 0.61.2
Source dir: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem
Build dir: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build
Build type: native build
Project name: PCem
Project version: vNext
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -D_FILE_OFFSET_BITS=64 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/sanitycheckc.exe
C compiler for the host machine: cc (gcc 11.2.0 "cc (GCC) 11.2.0")
C linker for the host machine: cc ld.bfd 2.38
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: c++ (gcc 11.2.0 "c++ (GCC) 11.2.0")
C++ linker for the host machine: c++ ld.bfd 2.38
Sanity testing C compiler: cc
Is cross compiler: False.
Sanity check compiler command line: cc sanitycheckc.c -o sanitycheckc.exe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -D_FILE_OFFSET_BITS=64 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/sanitycheckc.exe
C compiler for the build machine: cc (gcc 11.2.0 "cc (GCC) 11.2.0")
C linker for the build machine: cc ld.bfd 2.38
Sanity testing C++ compiler: c++
Is cross compiler: False.
Sanity check compiler command line: c++ sanitycheckcpp.cc -o sanitycheckcpp.exe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: c++ (gcc 11.2.0 "c++ (GCC) 11.2.0")
C++ linker for the build machine: c++ ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Determining dependency 'sdl2' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion sdl2` -> 0
2.0.20
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --cflags sdl2` -> 0
-I/usr/include/SDL2 -D_REENTRANT
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs sdl2` -> 0
-L/usr/lib -pthread -lSDL2
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs sdl2` -> 0
-pthread -lSDL2
Running compile:
Working directory: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmp6l1a5sac
Command line: c++ /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmp6l1a5sac/testfile.cpp -o /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmp6l1a5sac/output.exe -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now

Code:
#include<stdio.h>

int main(void) {
printf("%ld\n", (long)(sizeof(void *)));
return 0;
}
Compiler stdout:

Compiler stderr:
In file included from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmp6l1a5sac/testfile.cpp:1:
/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~

Program stdout:

8

Program stderr:


Running compile:
Working directory: /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmpbszbgphl
Command line: c++ /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmpbszbgphl/testfile.cpp -o /var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/meson-private/tmpbszbgphl/output.obj -c -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 -O0 -fpermissive --print-search-dirs

Code:

Compiler stdout:
install: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/
programs: =/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/
libraries: =/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../x86_64-pc-linux-gnu/11.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/:/lib/x86_64-pc-linux-gnu/11.2.0/:/lib/../lib/:/usr/lib/x86_64-pc-linux-gnu/11.2.0/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../:/lib/:/usr/lib/

Compiler stderr:

Run-time dependency sdl2 found: YES 2.0.20
Pkg-config binary for 1 is cached.
Determining dependency 'openal' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion openal` -> 0
1.21.1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --cflags openal` -> 0
-I/usr/include/AL
env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs openal` -> 0
-L/usr/lib -lopenal
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs openal` -> 0
-lopenal
Run-time dependency openal found: YES 1.21.1
Pkg-config binary for 1 is cached.
Determining dependency 'gl' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion gl` -> 0
1.2
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --cflags gl` -> 0

env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs gl` -> 0
-L/usr/lib -lGL
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs gl` -> 0
-lGL
Run-time dependency gl found: YES 1.2
wx-config binary missing from cross or native file, or env var undefined.
Trying a default wx-config fallback at wx-config-3.0
Trying a default wx-config fallback at wx-config
Trying a default wx-config fallback at wx-config-gtk3
wx-config found: YES (/usr/bin/wx-config-gtk3) 3.0.5
Run-time dependency WxWidgets found: YES 3.0.5
Pkg-config binary for 1 is cached.
Determining dependency 'libpcap' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion libpcap` -> 0
1.10.1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --cflags libpcap` -> 0

env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs libpcap` -> 0
-L/usr/lib -lpcap
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs libpcap` -> 0
-lpcap
Run-time dependency libpcap found: YES 1.10.1
Pkg-config binary for 1 is cached.
Determining dependency 'alsa' with pkg-config executable '/usr/bin/pkg-config'
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --modversion alsa` -> 0
1.2.6.1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --cflags alsa` -> 0

env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs alsa` -> 0
-L/usr/lib -lasound
env[PKG_CONFIG_PATH]:
Called `/usr/bin/pkg-config --libs alsa` -> 0
-lasound
Run-time dependency alsa found: YES 1.2.6.1
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300

src/wx-ui/meson.build:2:0: ERROR: Program or command 'wxrc' not found or not executable
cricket
Posts: 17
Joined: Mon 18 Apr, 2022 9:33 pm

Re: Can't compile pcem-git on Arch Linux

Post by cricket »

Hi, I'm not familiar with Arch, but I see the last line says " src/wx-ui/meson.build:2:0: ERROR: Program or command 'wxrc' not found or not executable"
Did you install the package that contains the binary wxrc? on Debian it's wx-common.
yataghan012
Posts: 5
Joined: Sat 08 Jan, 2022 4:25 pm

Re: Can't compile pcem-git on Arch Linux

Post by yataghan012 »

cricket wrote: Mon 18 Apr, 2022 9:48 pm Hi, I'm not familiar with Arch, but I see the last line says " src/wx-ui/meson.build:2:0: ERROR: Program or command 'wxrc' not found or not executable"
Did you install the package that contains the binary wxrc? on Debian it's wx-common.
I think there's definetly a problem with Wx Widgets. But I don't know exactly what's wrong.
My GUI Pamac says it depends on wxgtx3 (and other 3 packages), and I obviously have that installed (otherwise it wouldn't let me). I also have wxcommon-light installed.



Anyway I've been getting this on my pamac compile log (last lines only) since the last update (Apr 18):

-- Found OpenAL: /usr/lib/libopenal.so
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake/Modules/FindwxWidgets.cmake:1025 (find_package_handle_standard_args)
CMakeLists.txt:116 (find_package)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/pamac-build-manjaro/pcem-git/src/pcem/build/CMakeFiles/CMakeOutput.log".
==> ERROR: Se produjo un fallo en build().
Cancelando...
cricket
Posts: 17
Joined: Mon 18 Apr, 2022 9:33 pm

Re: Can't compile pcem-git on Arch Linux

Post by cricket »

CAVEAT: I did all this just to have some fun, I'm not familiar with Arch and I'm sure there's a better way of doing it. But here it goes.

First remove all wx related packages that you have installed. Make sure you remove them (pacman -R)

Then install base-devel

Code: Select all

pacman -S base-devel
Download and compile wxWidgets*

Code: Select all

wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.6/wxWidgets-3.1.6.tar.bz2
tar xvf wxWidgets-3.1.6
cd wxWidgets-3.1.6
./configure
make
sudo make install
*You should probably do all this "the Arch way", creating a PKGBUILD file, so you can install it using pacman to keep track of the files it installs, but I'm not familiar with this procedure and its details and don't want to spend much more time figuring it out.

Now install latest PCem, first the dependencies

Code: Select all

pacman -S git libslirp cmake sdl2 sdl2_net openal
Then compile and install. This will give you access to the internet (no local network though).

Code: Select all

git clone https://github.com/sarah-walker-pcem/pcem/
mkdir build
cd build
export LD_LIBRARY_PATH=/usr/local/lib
cmake .. -DUSE_NETWORKING=YES -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
You now can run PCem on your Arch linux.

Code: Select all

export LD_LIBRARY_PATH=/usr/local/lib
pcem
Or all in a single line

Code: Select all

LD_LIBRARY_PATH=/usr/local/lib pcem
I hope this helped you!

Note:
You can also pass --prefix=/usr when you compile wxWidgets, so you don't have to add LD_LIBRARY_PATH every time you run PCem. But it would probably get overwritten if you install a new wx package/update your system and it's not a good idea.
Last edited by cricket on Wed 27 Apr, 2022 3:05 am, edited 1 time in total.
yataghan012
Posts: 5
Joined: Sat 08 Jan, 2022 4:25 pm

Re: Can't compile pcem-git on Arch Linux

Post by yataghan012 »

when installing pcem, I still get wxwidgets error. I did everything beforewards.

> sudo make install
[ 0%] Generating wx-ui/wx-resources.cpp
wxrc: error while loading shared libraries: libwx_baseu_xml-3.1.so.6: cannot open shared object file: No such file or directory
make[2]: *** [src/CMakeFiles/pcem.dir/build.make:74: src/wx-ui/wx-resources.cpp] Error 127
make[1]: *** [CMakeFiles/Makefile2:97: src/CMakeFiles/pcem.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
cricket
Posts: 17
Joined: Mon 18 Apr, 2022 9:33 pm

Re: Can't compile pcem-git on Arch Linux

Post by cricket »

Did you first install wxwidgets from source as I told you? If you did, you shouldn't be seeing that error message.

About pcem, I checked that there was a make missing before sudo make install in my instructions.

Anyway I hope this works for you. I tested it on a vanilla Arch installation. If it still doesn't work I would recommend you to switch to a different distro or simply grab a binary from somewhere. If you want I could share with you the one I created. PM me.
yataghan012
Posts: 5
Joined: Sat 08 Jan, 2022 4:25 pm

Re: Can't compile pcem-git on Arch Linux

Post by yataghan012 »

Thanks friend, Pcem works just like before, I mostly used it for old windows/DOS games that are impossible to install on Linux, I did the "make" commands again and it worked.

I wish I knew what was wrong with the packets I installed with my Pamac GUI, it worked just fine the first few montths :?

Greetings.
cricket
Posts: 17
Joined: Mon 18 Apr, 2022 9:33 pm

Re: Can't compile pcem-git on Arch Linux

Post by cricket »

My pleasure!
Post Reply