bjornhanson / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

Gentoo gcc 4.3.4 - Linking ascii objects #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
gcc version 4.3.4 (Gentoo 4.3.4 p1.0, pie-10.1.5)
Linking of ascii text files (cgi_root.html->cgi_root.o, etc.) seems to be a 
problem in my 
environment

What is the expected output? What do you see instead?
...............................
/bin/sh ./libtool --tag=CC   --mode=link gcc -g -std=gnu99 -Wall -Os -static  
-o 
shellinaboxd shellinaboxd.o externalfile.o launcher.o privileges.o service.o 
session.o usercss.o 
shellinabox/cgi_root.o shellinabox/root_page.o shellinabox/vt100.o 
shellinabox/shell_in_a_box.o shellinabox/styles.o shellinabox/print-styles.o 
shellinabox/enabled.o shellinabox/favicon.o shellinabox/beep.o liblogging.la 
libhttp.la -lz -ldl -
lutil 
libtool: link: gcc -g -std=gnu99 -Wall -Os -o shellinaboxd shellinaboxd.o 
externalfile.o 
launcher.o privileges.o service.o session.o usercss.o shellinabox/cgi_root.o 
shellinabox/root_page.o shellinabox/vt100.o shellinabox/shell_in_a_box.o 
shellinabox/styles.o 
shellinabox/print-styles.o shellinabox/enabled.o shellinabox/favicon.o 
shellinabox/beep.o  
./.libs/liblogging.a ./.libs/libhttp.a -lz -ldl -lutil
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.3.4/../../../../powerpc-unknown-linux-
gnu/bin/ld:shellinabox/cgi_root.o: file format not recognized; treating as 
linker script
/usr/lib/gcc/powerpc-unknown-linux-gnu/4.3.4/../../../../powerpc-unknown-linux-
gnu/bin/ld:shellinabox/cgi_root.o:1: syntax error
collect2: ld returned 1 exit status
make[1]: *** [shellinaboxd] Error 1
make[1]: Leaving directory `/usr/src/shellinabox-2.10'
make: *** [all] Error 2

What version of the product are you using? On what operating system?
shellinabox-2.10
linux-2.6.30-gentoo-r8

Original issue reported on code.google.com by rudolf.s...@gmail.com on 22 Nov 2009 at 9:54

GoogleCodeExporter commented 8 years ago
I don't think that ASCII or the fact that you are using Gentoo is the problem 
here. 
More likely, the problem is that you are the first reported user to build on a 
powerpc. You will need to edit Makefile.am and add the missing information to 
the 
definition of "objcopyflags".

Unfortunately, without having easy access to a powerpc machine with Linux on 
it, I am 
not quite sure what needs to be entered here.

Try running "objcopy" without any arguments, and it should tell you which build 
targets it supports. This should help you get started.

Once you have a solution, please let me know and I'll add it to the official 
source 
tree.

Original comment by zod...@gmail.com on 22 Nov 2009 at 10:30

GoogleCodeExporter commented 8 years ago
Seems to work - I'm not sure about the -B because it has no impact at all on 
the ppc platform but it looks much better 
;-) Thanks a lot and have a good sleep

objcopyflags = case "$(host_cpu)" in                                  \
                         i[0-9]86) echo '-O elf32-i386 -B i386';;             \
                         x86_64)   echo '-O elf64-x86-64 -B i386:x86-64';;    \
                         arm*)     echo '-O elf32-littlearm -B arm';;         \
                         powerpc*) echo '-O elf32-powerpc -B powerpc';;       \
                       esac

Original comment by rudolf.s...@gmail.com on 22 Nov 2009 at 11:34

GoogleCodeExporter commented 8 years ago
Thanks for that information. The change is now in the top of the subversion 
tree. 
Please let me know, if you have any problems with it.

Original comment by zod...@gmail.com on 23 Nov 2009 at 4:58