vitasdk / vdpm

SDK installer and package "manager" for $VITASDK
GNU Lesser General Public License v2.1
221 stars 62 forks source link

ELF not found , when trying to cmake the hello world sample #76

Closed NekoMimiOfficial closed 2 months ago

NekoMimiOfficial commented 2 years ago

Howdy so i successfuly installed vdpm , added the it to $PATH and i cloned the samples to try and test it

so far i did cmake .

this is the output

nekomimi@pavilion:~/samples/hello_world$ cmake .
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/local/vitasdk/bin/arm-vita-eabi-gcc
-- Check for working C compiler: /usr/local/vitasdk/bin/arm-vita-eabi-gcc - broken
CMake Error at /usr/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/usr/local/vitasdk/bin/arm-vita-eabi-gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/nekomimi/samples/hello_world/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake cmTC_8d88c/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_8d88c.dir/build.make CMakeFiles/cmTC_8d88c.dir/build
    gmake[1]: Entering directory '/home/nekomimi/samples/hello_world/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_8d88c.dir/testCCompiler.c.obj
    /usr/local/vitasdk/bin/arm-vita-eabi-gcc   -Wl,-q  -o CMakeFiles/cmTC_8d88c.dir/testCCompiler.c.obj -c /home/nekomimi/samples/hello_world/CMakeFiles/CMakeTmp/testCCompiler.c
    /usr/local/vitasdk/bin/arm-vita-eabi-gcc: 1: ELF: not found
    /usr/local/vitasdk/bin/arm-vita-eabi-gcc: 3: Syntax error: Unterminated quoted string
    gmake[1]: *** [CMakeFiles/cmTC_8d88c.dir/build.make:85: CMakeFiles/cmTC_8d88c.dir/testCCompiler.c.obj] Error 2
    gmake[1]: Leaving directory '/home/nekomimi/samples/hello_world/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:140: cmTC_8d88c/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:18 (project)

-- Configuring incomplete, errors occurred!
See also "/home/nekomimi/samples/hello_world/CMakeFiles/CMakeOutput.log".
See also "/home/nekomimi/samples/hello_world/CMakeFiles/CMakeError.log".
NekoMimiOfficial commented 2 years ago

here is the CMakeError.log

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/vitasdk/bin/arm-vita-eabi-gcc
Build flags: ;-Wl,-q
Id flags:

The output was:
2
/usr/local/vitasdk/bin/arm-vita-eabi-gcc: 1: ^?ELF^B^A^A^B: not found
/usr/local/vitasdk/bin/arm-vita-eabi-gcc: 3: Syntax error: Unterminated quoted string

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/vitasdk/bin/arm-vita-eabi-gcc
Build flags: ;-Wl,-q
Id flags: -c

The output was:
2
/usr/local/vitasdk/bin/arm-vita-eabi-gcc: 1: ^?ELF^B^A^A^B: not found
/usr/local/vitasdk/bin/arm-vita-eabi-gcc: 3: Syntax error: Unterminated quoted string

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/vitasdk/bin/arm-vita-eabi-gcc
Build flags: ;-Wl,-q
Id flags: -Aa

The output was:
2
NekoMimiOfficial commented 2 years ago

my machine runs debian 10 (32bits)

NekoMimiOfficial commented 2 years ago

i tried to run arm-vita-eabi-gcc in terminal

  master*  arm-vita-eabi-gcc                                                                                         samples/hello_world  
zsh: exec format error: arm-vita-eabi-gcc

and yes i did add vitasdk to $PATH in .zshrc

bruneo32 commented 8 months ago

I'm having the same issue, and I found this:

$ file /usr/local/vitasdk/bin/arm-vita-eabi-gcc 
/usr/local/vitasdk/bin/arm-vita-eabi-gcc: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a4fb1cf40655ee37f40b2f64f3a51fecb7415414, for GNU/Linux 3.2.0, stripped

Which means, that arm-vita-eabi-gcc is a x86-64 executable. Since my pc is ARM, I cannot run it.