installing sim on 12.04. error.

More
02 Jan 2013 05:15 - 02 Jan 2013 06:00 #28289 by Gelar
hello.
i'm trying to install sim on notebook on ubuntu 12.10 (other versions do not support notebook devices). after ./configure --enable-simulator it says okay to make.
the 'make' result:
Linking halscope
Compiling emc/usr_intf/axis/extensions/emcmodule.cc
Linking python module linuxcnc.so
Linking ../rtlib/abs.so
«__x86.get_pc_thunk.bx» points to section «.text» from objects/abs.tmp: defined in skipped section «.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]» from objects/abs.tmp
«__x86.get_pc_thunk.bx» points to section «.text» из objects/abs.tmp: defined in skipped section  «.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]» from objects/abs.tmp
«__x86.get_pc_thunk.bx» points to section  «.text» из objects/abs.tmp: defined in skipped section  «.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]» from objects/abs.tmp
«__x86.get_pc_thunk.bx» points to section  «.text» из objects/abs.tmp: defined in skipped section  «.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]» from objects/abs.tmp
collect2: error: execution ld ended with return code 1
make: *** [../rtlib/abs.so] Error 1
make: Leaving `/home/orr/linuxcnc-dev/src'

in wiki.linuxcnc.org/cgi-bin/wiki.pl?Debian...-Rt_Compile_LinuxCNC:

With the latest Debian Wheezy, all LinuxCNC builds failed using the default gcc-4.7, throwing errors like the following:
Linking ../rtlib/abs.so
ld -r -o objects/abs.tmp objects/rtobjects/hal/components/abs.o
gcc -shared -Bsymbolic -L/home/maker/linuxcnc-dev.head/lib -Wl,-rpath,/home/maker/linuxcnc-dev.head/lib -o ../rtlib/abs.so objects/abs.tmp -lm
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/abs.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/abs.tmp
To get a working build (even of unmodified LinuxCNC code) I needed to revert back to gcc-4.6:
sudo aptitude install gcc-4.6 gcc-4.6-base
export CC=gcc-4.6


but it didn't help, the error is the same after changing gcc from 4.7 to 4.6.

but. after export CC=gcc-4.6 gcc -v is still 4.7.

oh, it seems i do not know where should i place
export CC=gcc-4.6
export CXX=g++-4.6
in .userconfig - i do not know where it is or should i create it.

created it in src and in linuxcnc-dev, nothing changes.
Last edit: 02 Jan 2013 06:00 by Gelar.

Please Log in or Create an account to join the conversation.

More
02 Jan 2013 07:37 #28293 by bondglen
I am having the same problems with gcc. I am currently in process of trying to install gcc-4.6, but I am concerned with 'will it work if I install 2 compilers'. and like you, how do you invoke the correct one.
I am not sure, but I think the 'export' is a shell command that is invoked from the command line, have you tried that?

Please Log in or Create an account to join the conversation.

More
02 Jan 2013 14:51 - 03 Jan 2013 04:26 #28294 by Gelar
oh, yes, this is the first i began with )
finally!
cd /usr/bin
sudo ln -s gcc-4.6 gcc
sudo ln -s g++-4.6 g++
after this make goes to full completion and 2.6.0~pre starts. hope google index this topic for those, who couldn't install. including people from irc channel.

btw why does it compile all rt modules even in sim configuration?

and please can moderator change in topic name 12.04 on 12.10? somehow I made a mistake.
Last edit: 03 Jan 2013 04:26 by Gelar.

Please Log in or Create an account to join the conversation.

More
03 Jan 2013 12:03 #28334 by bondglen
OK I installed gcc-4.6 and g++-4.6
Download the 2 files and install with pkgtool.
It will set the links for you.
Did a clean compile and got no errors.
Seems to work so far.

I am running Slackware 14
I also had to change line 6 of file: emc2/src/emc/sai/Submakefile
From: LIBREADLINE=-lreadline
To: LIBREADLINE=-lreadline -ltermcap

Please Log in or Create an account to join the conversation.

Time to create page: 0.159 seconds
Powered by Kunena Forum