-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, at first I should mention that this post is about Gentoo/FreeBSD for amd64 port, using the Gentoo portage system with FreeBSD sources, library and so on. If you're not interested in this you can stop reading now :-).
I'm compiling "make" (usr.bin/make), but when I try to execute it I got the following results: [EMAIL PROTECTED] ~ # /usr/bin/make ELF binary type "0" not known. - -su: /usr/bin/make: cannot execute binary file [EMAIL PROTECTED] ~ # I must say that this *only* happends when "make" is built statically (if you want it compiled dynamically change the Makefile). This is the file information about it: [EMAIL PROTECTED] ~ # file /usr/bin/make /usr/bin/make: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for FreeBSD 6.1, statically linked, for FreeBSD 6.1, stripped [EMAIL PROTECTED] ~ # Doing some research I found that every static binary has the same issue, so consider the following example as trust of this: #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { printf("it works!\n"); exit(EXIT_SUCCESS); } Compile it statically: [EMAIL PROTECTED] ~ # gcc -static test.c -o test [EMAIL PROTECTED] ~ # file test test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for FreeBSD 6.1, statically linked, for FreeBSD 6.1, not stripped [EMAIL PROTECTED] ~ # Then run it: [EMAIL PROTECTED] ~ # ./test ELF binary type "0" not known. - -su: ./test: cannot execute binary file [EMAIL PROTECTED] ~ # Now it's time to do the same as dinamically: [EMAIL PROTECTED] ~ # gcc test.c -o test [EMAIL PROTECTED] ~ # file test test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for FreeBSD 6.1, dynamically linked (uses shared libs), for FreeBSD 6.1, not stripped [EMAIL PROTECTED] ~ # ./test it works! [EMAIL PROTECTED] ~ # Can anyone point me a possible solution to fix this? I tried doing: "sysctl kern.default_elf_branding=9" but it's a hack and I think it should have a more elegant solution. For some system information, I have the following: binutils (version 2.17), available BFDs: elf64-x86-64 elf32-i386 elf32-i386-freebsd coff-i386 efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex binutils (version 2.16), available emulations: elf_x86_64_fbsd elf_i386_fbsd elf_x86_64 elf_i386 gcc: gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9) system: athlon64 3500+ freebsd sources used: 6.1-RELEASE Thanks for any input in advance, - -- Victor Roman Archidona -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFEry+sQ/ddYKMfqaARAqUeAJ9TTWBLAJCLxQ7pkNOZHWoc0qFkpQCfY9WT HO1N6kfSIgmROAFT1fxMp9o= =4vZz -----END PGP SIGNATURE----- _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"