Skip to content

Fail to compile new build on raspberry pi 4 #1791

Open
@BiobaTiry

Description

Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.

Platform / OS / Hardware: Raspberry Pi 4

Flycast version: 2.4

Hardware:

Description of the Issue
I've installed the required packages:

sudo apt install git libao-dev libasound2-dev libevdev-dev libgl1-mesa-dev liblua5.3-dev libminiupnpc-dev libpulse-dev libsdl2-dev libudev-dev libzip-dev cmake libcurl4-openssl-dev libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxkbcommon-dev libdrm-dev libgbm-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev

i've try to compile with this command:

git clone --recursive https://github.com/flyinghead/flycast.git
cd flycast
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

After few minutes i've got some errors..

Logs Gathered


Determining if the __ARM64__ exist failed with the following output:
Change Dir: /home/pi/flycast/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_6b3bc/fast && /usr/bin/make -f CMakeFiles/cmTC_6b3bc.dir/build.make CMakeFiles/cmTC_6b3bc.dir/build
make[1]: Entering directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_6b3bc.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_6b3bc.dir/CheckSymbolExists.c.o   -c /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: error: ‘__ARM64__’ undeclared (first use in this function); did you mean ‘__TIME__’?
   return ((int*)(&__ARM64__))[argc];
                   ^~~~~~~~~
                   __TIME__
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_6b3bc.dir/build.make:66: CMakeFiles/cmTC_6b3bc.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_6b3bc/fast] Error 2


File /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */

int main(int argc, char** argv)
{
  (void)argv;
#ifndef __ARM64__
  return ((int*)(&__ARM64__))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the __aarch64__ exist failed with the following output:
Change Dir: /home/pi/flycast/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_40cea/fast && /usr/bin/make -f CMakeFiles/cmTC_40cea.dir/build.make CMakeFiles/cmTC_40cea.dir/build
make[1]: Entering directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_40cea.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_40cea.dir/CheckSymbolExists.c.o   -c /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: error: ‘__aarch64__’ undeclared (first use in this function)
   return ((int*)(&__aarch64__))[argc];
                   ^~~~~~~~~~~
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_40cea.dir/build.make:66: CMakeFiles/cmTC_40cea.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_40cea/fast] Error 2


File /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */

int main(int argc, char** argv)
{
  (void)argv;
#ifndef __aarch64__
  return ((int*)(&__aarch64__))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Determining if the _M_ARM64 exist failed with the following output:
Change Dir: /home/pi/flycast/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_cb3d7/fast && /usr/bin/make -f CMakeFiles/cmTC_cb3d7.dir/build.make CMakeFiles/cmTC_cb3d7.dir/build
make[1]: Entering directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cb3d7.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_cb3d7.dir/CheckSymbolExists.c.o   -c /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: error: ‘_M_ARM64’ undeclared (first use in this function)
   return ((int*)(&_M_ARM64))[argc];
                   ^~~~~~~~
/home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_cb3d7.dir/build.make:66: CMakeFiles/cmTC_cb3d7.dir/CheckSymbolExists.c.o] Error 1
make[1]: Leaving directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_cb3d7/fast] Error 2


File /home/pi/flycast/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */

int main(int argc, char** argv)
{
  (void)argv;
#ifndef _M_ARM64
  return ((int*)(&_M_ARM64))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/pi/flycast/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_4d556/fast && /usr/bin/make -f CMakeFiles/cmTC_4d556.dir/build.make CMakeFiles/cmTC_4d556.dir/build
make[1]: Entering directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4d556.dir/src.c.o
/usr/bin/cc   -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_4d556.dir/src.c.o   -c /home/pi/flycast/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_4d556
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4d556.dir/link.txt --verbose=1
/usr/bin/cc  -DCMAKE_HAVE_LIBC_PTHREAD    -rdynamic CMakeFiles/cmTC_4d556.dir/src.c.o  -o cmTC_4d556 
/usr/bin/ld: CMakeFiles/cmTC_4d556.dir/src.c.o: in function `main':
src.c:(.text+0x40): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x4c): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x5c): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_4d556.dir/build.make:87: cmTC_4d556] Error 1
make[1]: Leaving directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_4d556/fast] Error 2


Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/pi/flycast/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_2f831/fast && /usr/bin/make -f CMakeFiles/cmTC_2f831.dir/build.make CMakeFiles/cmTC_2f831.dir/build
make[1]: Entering directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2f831.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_2f831.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C executable cmTC_2f831
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2f831.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_2f831.dir/CheckFunctionExists.c.o  -o cmTC_2f831  -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_2f831.dir/build.make:87: cmTC_2f831] Error 1
make[1]: Leaving directory '/home/pi/flycast/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_2f831/fast] Error 2





Screenshots

(Replace this line with any issue screenshots)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions