Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to compile arm64 Linux #221

Closed
kero990 opened this issue Aug 1, 2022 · 8 comments
Closed

Error when trying to compile arm64 Linux #221

kero990 opened this issue Aug 1, 2022 · 8 comments

Comments

@kero990
Copy link

kero990 commented Aug 1, 2022

I tried to compile this project on a Linux machine with arm64 architecture, but I got the following error.

I am not sure whether the missing key file is necessary, nor do I confirm the practical significance of the second error. But it obviously does not generate a makefile. What is the problem? Is it related to architecture?

~$ git clone --recursive https://github.com/Cpasjuste/pemu.git`
~$ cd pemu
~/pemu$ mkdir cmake-build && cd cmake-build
~/pemu/cmake-build$ cmake -G "Unix Makefiles" -DPLATFORM_LINUX=ON -DOPTION_BUILTIN_LIBCONFIG=ON  -DOPTION_EMU=pfbneo -DCMAKE_BUILD_TYPE=Release ..
-- C2D: target platform: linux, cmake version: 3.13.4
-- C2D: SDL2 OpenGL 3.3 support enabled
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.1.2") 
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11") 
CMake Warning at sscrap/CMakeLists.txt:117 (message):
  ss_dev_id.key and ss_dev_pwd.key files not found,

          using dummy ss keys. Please fix if you want to use live scrapping...


CMake Error at pfbneo/CMakeLists.txt:104 (list):
  list sub-command REMOVE_ITEM requires list to be present.


-- C2D: Be sure to build "pfbneo.deps" target before "pfbneo" target
-- Configuring incomplete, errors occurred!

@Cpasjuste
Copy link
Owner

Cpasjuste commented Aug 1, 2022

Hi,

It doesn't seems related to an architecture problem but more to a platform one. Did you init git submodules ? Else, could you try with the "dev" branch ?

@kero990
Copy link
Author

kero990 commented Aug 2, 2022

Accessing github is a bit difficult in my area, so I use mirror sites when I'm in git. However, mirror sites can't handle submodules, so I git cloned libcross2d and sscrap separately, I'm not sure what's the difference between this and a direct git clone --recursive full project, or how do these two subprojects need to be initialized?

@kero990
Copy link
Author

kero990 commented Aug 5, 2022

@Cpasjuste
Hi, it was true that my submodule was incomplete last time. This time I completely cloned the entire project, but stopped at 10% when making, evertime. I even compiled on a fully reset debian10 with a virtual machine and the result was the same. I haven't tried higher debian versions yet, but I suspect that binaries compiled with higher versions also won't work on debian10. Is this a debian issue, maybe I should try Ubuntu?

[  8%] Building C object libcross2d/source/skeleton/romfs/libzip/lib/CMakeFiles/zip.dir/zip_random_unix.c.o
[  9%] Linking C static library libzip.a
[  9%] Built target zip
make[1]: *** [CMakeFiles/Makefile2:586: pfbneo/CMakeFiles/pfbneo_linux_release.dir/rule] Error 2
make: *** [Makefile:294: pfbneo_linux_release] Error 2

In addition, I have found some errors in the cmake log

CheckFunctionExists.c:(.text+0x10): undefined reference to `_close'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_bf29a.dir/build.make:87: cmTC_bf29a] Error 1
make[1]: Leaving directory '/root/pemu/cmake-build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_bf29a/fast] Error 2

like this,too many
So is this a debian issue or a version too low issue?

@kero990
Copy link
Author

kero990 commented Aug 11, 2022

on ubuntu18.04

[ 11%] Built target pfbneo-romfs
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/pemu/libcross2d/source/platforms/glad/glad/__main__.py", line 174, in <module>
    main()
  File "/home/ubuntu/pemu/libcross2d/source/platforms/glad/glad/__main__.py", line 140, in main
    spec = get_spec(ns.spec, reproducible=ns.reproducible)
  File "/home/ubuntu/pemu/libcross2d/source/platforms/glad/glad/__main__.py", line 45, in get_spec
    return spec_cls.from_remote(opener=opener)
  File "/home/ubuntu/pemu/libcross2d/source/platforms/glad/glad/parse.py", line 66, in from_remote
    return cls.from_url(cls.API + cls.NAME + '.xml', opener=opener)
  File "/home/ubuntu/pemu/libcross2d/source/platforms/glad/glad/parse.py", line 55, in from_url
    raw = f.read()
  File "/usr/lib/python3.6/http/client.py", line 480, in read
    s = self._safe_read(self.length)
  File "/usr/lib/python3.6/http/client.py", line 632, in _safe_read
    raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(1132011 bytes read, 1620561 more expected)
libcross2d/source/platforms/glad/CMakeFiles/glad-generate-files.dir/build.make:61: recipe for target 'libcross2d/source/platforms/glad/src/glad.c' failed
make[3]: *** [libcross2d/source/platforms/glad/src/glad.c] Error 1
CMakeFiles/Makefile2:147: recipe for target 'libcross2d/source/platforms/glad/CMakeFiles/glad-generate-files.dir/all' failed
make[2]: *** [libcross2d/source/platforms/glad/CMakeFiles/glad-generate-files.dir/all] Error 2
CMakeFiles/Makefile2:580: recipe for target 'pfbneo/CMakeFiles/pfbneo_linux_release.dir/rule' failed
make[1]: *** [pfbneo/CMakeFiles/pfbneo_linux_release.dir/rule] Error 2
Makefile:294: recipe for target 'pfbneo_linux_release' failed
make: *** [pfbneo_linux_release] Error 2

@kero990
Copy link
Author

kero990 commented Aug 20, 2022

I have tried many times, including on debian and ubuntu on the x64 platform, and now I will get stuck on compiling the cross2d subproject. Whether it is compiling the entire pemu or trying to compile cross2d alone, there is no success. The current error is as follows.

/home/ubuntu/pemu/libcross2d/source/skeleton/audio.cpp: In constructor ‘c2d::Audio::Audio(int, int, c2d::Audio::C2DAudioCallback)’:
/home/ubuntu/pemu/libcross2d/source/skeleton/audio.cpp:11:17: error: expected type-specifier before ‘C2DMutex’
   11 |     mutex = new C2DMutex();
      |                 ^~~~~~~~
make[2]: *** [CMakeFiles/cross2d.dir/build.make:76: CMakeFiles/cross2d.dir/source/skeleton/audio.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cross2d.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

@Cpasjuste
Copy link
Owner

Hi, is this still a problem with latest version ?

@kero990
Copy link
Author

kero990 commented Apr 6, 2023

Hi, is this still a problem with latest version ?

There are no issues with the compilation now, the problem lies at runtime. I can run it perfectly on the latest Ubuntu latest, but since my arm device only has debian10, there may be some issues running on debian10, and currently it will report an error:

umount: /tmp/c2d_ Romfs: Insufficient permissions
fuse: bad mount point `/tmp/c2d_ romfs/': Permission denied
POSIXRomFs::POSIXRomFs: fuse_ setup failed

If I use sudo to run, there will be no errors, but no interface will appear, and you cannot use Ctrl+C to terminate the run. can only kill the process.

@Cpasjuste
Copy link
Owner

Hi, i removed the "hacky" fusefs romfs on linux and now just copy the romfs files to "data_romfs" insead release folder, this may fix your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants