Re: [Vala] error: Failed to execute child process (Exec format error)



It appears you have an invalid exe file, may you try to execute valac
--help to see if it valid exe.

Have you latest gib version installed? Because Vala is in line with a
specific GLib/GTK version.
El jun. 16, 2016 8:03 AM, "oyster" <lepto python gmail com> escribió:

My compiled valac says "error: Failed to execute child process (Exec
format error)"
any hints to trace what is the problem?

1. I have a pre-installed Mingw + msys on my win7 64 bits to compile
32bits applications, which can compile CPP/C program without problem.
pkg-config is avaliable too. And I don't want to install yet another
mingw+msys since I have installed many libs

2. Install old vala
I downloaded vala-0.18.0-mingw32-bin.tar from
http://linbox.free.fr/vala/, and decompressed it into
/opt/windows_32/vala-my-build, then I add
/opt/windows_32/vala-my-build into PATH

3. test old vala on hello.vala to prove vala-0.18 runs with my mingw+msys
[I am hello.vala]
void main()
{print("hello\n");}
[/I am hello.vala]

[compile hello]
$ valac hello.vala
r:/hello.vala.c: In function 'main':
r:/hello.vala.c:20:2: warning: 'g_type_init' is deprecated (declared at
E:/msys/
opt/windows_32/include/glib-2.0/gobject/gtype.h:681)
[-Wdeprecated-declarations]

  g_type_init ();
  ^
[compile hello]

then run hello.exe
[run hello.exe]
$ hello.exe
hello
[/run hello.exe]

4. then download
https://wiki.gnome.org/Projects/Vala/Release#Vala_0.32.0 and
decompress it into /r/vala-0.32.0

5. compile Vala_0.32.0 and install into my mingw+msys
[compile Vala_0.32.0 and install into my mingw+msys]
$ cd /r/vala-0.32.0
$ ./configure --prefix=/opt/windows_32/vala-my-build
$ make
$ make install
[/compile Vala_0.32.0 and install into my mingw+msys]

6. testing new-compiled vala-0.32 on hello.vala failed
[test new-compiled vala-0.32]
$ valac hello.vala
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
Compilation failed: 3 error(s), 0 warning(s)
[/test new-compiled vala-0.32]

7. in case you want this failed test. Of cause, it can not succeed
since we have met the faliure in step 6
[make test]
$ make test
cd tests && make  check
make[1]: Entering directory `/r/vala-0.32.0/tests'
make  check-am
make[2]: Entering directory `/r/vala-0.32.0/tests'
make  check-TESTS
make[3]: Entering directory `/r/vala-0.32.0/tests'
TEST: Building...                                                      FAIL
Compilation failed: 6 error(s), 0 warning(s)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
error: Failed to execute child process (Exec format error)
Makefile:2214: recipe for target `check-TESTS' failed
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/r/vala-0.32.0/tests'
Makefile:2088: recipe for target `check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/r/vala-0.32.0/tests'
Makefile:2090: recipe for target `check' failed
make[1]: *** [check] Error 2
make[1]: Leaving directory `/r/vala-0.32.0/tests'
Makefile:968: recipe for target `test' failed
make: *** [test] Error 2
[/make test]
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]