rebuild world false

Code:
===> lib/csu/i386-elf (obj,depend,all,install)
rm -f .depend
CC='gcc45' mkdep -f .depend -a    -I/usr/src/lib/csu/i386-elf/../common -I/usr/src/lib/csu/i386-elf/../../libc/include /usr/src/lib/csu/i386-
elf/crt1.c /usr/src/lib/csu/i386-elf/crti.S /usr/src/lib/csu/i386-elf/crtn.S
gcc45 -O2 -pipe -I/usr/src/lib/csu/i386-elf/../common  -I/usr/src/lib/csu/i386-elf/../../libc/include -std=gnu99   -Wsystem-headers -Werror 
-Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-
strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c 
/usr/src/lib/csu/i386-elf/crt1.c
{standard input}: Assembler messages:
{standard input}:27: Error: suffix or operands invalid for `mov'
*** Error code 1

Stop in /usr/src/lib/csu/i386-elf.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

i think i need a little help here :P
 
It's most likely defined in /etc/make.conf. If that file exist, remove or rename it and try again.
 
ok.I changed in make.conf CC=gcc45 to CC=gcc and worked!!!
But now i take this error:
Code:
[...]
/usr/obj/usr/src/tmp/usr/lib/libutil.so: undefined reference to `tcsetsid'
/usr/obj/usr/src/tmp/usr/lib/libutil.so: undefined reference to `pwrite'
/usr/obj/usr/src/tmp/usr/lib/libutil.so: undefined reference to `setlogin'
/usr/obj/usr/src/tmp/usr/lib/libutil.so: undefined reference to `raise'
/usr/obj/usr/src/tmp/usr/lib/libpam.so: undefined reference to `free'
/usr/obj/usr/src/tmp/usr/lib/libpam.so: undefined reference to `sigprocmask'
*** Error code 1

Stop in /usr/src/libexec/atrun.
*** Error code 1

Stop in /usr/src/libexec.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
 
Using any compiler flags in /etc/make.conf to build the world is severely discouraged, and not at all supported.
 
what i suppose to write in make.conf?
this is my make.conf
Code:
PYTHON_DEFAULT_VERSION=python2.6
CC=gcc45
CXX=g++45
CPP=cpp45
CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
# added by use.perl 2010-03-23 00:22:57
PERL_VERSION=5.10.1
USE_GNOME=gtk20
and i changed to this:
Code:
PYTHON_DEFAULT_VERSION=python2.6
CC=gcc
CXX=g++45
CPP=cpp45
CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
# added by use.perl 2010-03-23 00:22:57
PERL_VERSION=5.10.1
USE_GNOME=gtk20
Also i run make clean and now i am runnning buildworld again to see if will show me error
 
ok.I remove everything from /etc/make.conf
Now my make.conf is this:
Code:
PYTHON_DEFAULT_VERSION=python2.6
# added by use.perl 2010-03-23 00:22:57
PERL_VERSION=5.10.1
I made make clean on /usr/src and make buildworld again and now i take this:
Code:
--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj
/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  
VERSION="FreeBSD 8.0-RELEASE-p2 amd64 800107"  MAKEFLAGS="-m /usr/src/tools/build/mk  -m /usr/src/share/mk" make -f Makefile.inc1  DESTDIR=  
BOOTSTRAPPING=800107  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED  
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF legacy
===> tools/build (obj,includes,depend,all,install)
/usr/obj/usr/src/tmp/usr/src/tools/build created for /usr/src/tools/build
cd /usr/src/tools/build; make buildincludes; make installincludes
rm -f .depend
CC='gcc45' mkdep -f .depend -a    -I/usr/obj/usr/src/tmp/legacy/usr/include /usr/src/tools/build/dummy.c
gcc45 -O2 -pipe -mssse3   -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/tools/build/dummy.c
cc1: error: unrecognized command line option "-mssse3"
*** Error code 1

Stop in /usr/src/tools/build.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
 
$ which gcc
$ gcc --version
$ ls -ali /usr/bin/gcc /usr/bin/cc
$ env (be careful not to post sensitive/personal information)
 
which gcc
Code:
/usr/bin/gcc
gcc --version
Code:
gcc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ls -ali /usr/bin/gcc /usr/bin/CC
Code:
ls -ali /usr/bin/gcc /usr/bin/CC
1036312 -r-xr-xr-x  3 root  wheel  199904 Nov 21 16:30 /usr/bin/CC
1036310 lrwxr-xr-x  1 root  wheel       5 Mar 29 02:20 /usr/bin/gcc -> gcc45
env
Code:
GLADE_CATALOG_PATH=:
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
GTK_PATH=:/usr/local/lib/gtk-2.0
ENV=/home/********/.shrc
USER=root
SSH_AUTH_SOCK=/tmp/ssh-Q5Toet8JUO/agent.1415
LIBGLADE_MODULE_PATH=:/usr/local/lib/libglade/2.0
DBUS_SESSION_BUS_ADDRESS=unix:path=/var/tmp/dbus-scm7dMGVB2,guid=dc408262628aa366a1e16d3f4bafe375
SHELL=/bin/csh
FTP_PASSIVE_MODE=YES
MAIL=/var/mail/*****
WINDOWPATH=9
BLOCKSIZE=K
_=/usr/bin/startx
SHLVL=2
PAGER=more
WINDOWID=50381526
ICEAUTHORITY=/root/.ICEauthority
TERM=xterm
PWD=/
ORBIT_SOCKETDIR=/var/tmp/orbit-*******
GLADE_MODULE_PATH=:
GLADE_PIXMAP_PATH=:
COLORTERM=Terminal
OLDPWD=/home/********
SESSION_MANAGER=local/bsdserver.bsd:/tmp/.ICE-unix/1424
DISPLAY=:0.0
LOGNAME=root
SSH_AGENT_PID=1416
EDITOR=vi
XDG_DATA_DIRS=/usr/share:/usr/local/share
HOME=/root
XAUTHORITY=/root/.Xauthority
HOSTTYPE=FreeBSD
VENDOR=unknown
OSTYPE=FreeBSD
MACHTYPE=unknown
GROUP=wheel
HOST=bsdserver.bsd
REMOTEHOST=
 
sk8harddiefast said:
which gcc
Code:
/usr/bin/gcc
gcc --version
Code:
gcc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ls -ali /usr/bin/gcc /usr/bin/CC
Code:
ls -ali /usr/bin/gcc /usr/bin/CC
1036312 -r-xr-xr-x  3 root  wheel  199904 Nov 21 16:30 /usr/bin/CC
1036310 lrwxr-xr-x  1 root  wheel       5 Mar 29 02:20 /usr/bin/gcc -> gcc45

There are some strange contradictions here .. So 'gcc' is actually '/usr/bin/gcc', which is a symlink to 'gcc45' (whereas it should be a hard link to '/usr/bin/cc'), but still it tells us that its version is 4.2.1 ...

You gave me the output of [cmd=]ls -ali /usr/bin/gcc /usr/bin/CC[/cmd], but I really wanted [cmd=]ls -ali /usr/bin/gcc /usr/bin/cc[/cmd]. In fact, /usr/bin/cc and /usr/bin/gcc are actually the same file (hence the same inode), and the only way you can get rid of gcc45 (which screws up buildworld) is by making sure that /usr/bin/gcc is a hard link to (i.e. shares the inode with) /usr/bin/cc.

On my system it looks like this:

Code:
[B]94246[/B] -r-xr-xr-x  2 root  wheel  365120 Mar 18 16:43 /usr/bin/cc
[B]94246[/B] -r-xr-xr-x  2 root  wheel  365120 Mar 18 16:43 /usr/bin/gcc

The first number is the inode, and as you can these two files are actually one and the same. Remove the /usr/bin/gcc symlink, and link /usr/bin/gcc to /usr/bin/cc with a hard link (ln).

After that, both files should have the same inode, and your buildworld should work (after a thorough cleandir/cleanworld).
 
my /usr/bin/gcc was a symlink of gcc45 which is on /usr/local/bin.Now i removed CC and gcc symlink from /usr/bin, i run again which gcc and now the output is /usr/local/bin
On /usr/local/bin "ls -al gcc" command give me this output
Code:
ls -al gcc
lrwxr-xr-x  1 root  wheel  5 Mar 29 00:45 gcc -> gcc45
So i sould remove gcc symlink from /usr/local/bin and make
Code:
ln -s /usr/local/bin/gcc45 /usr/bin/CC
ln -s /usr/local/bin/gcc45 /usr/bin/gcc
Correct??
 
That's a symlink, and it's from the wrong file to the wrong file as well ... I don't think I explained it that badly :)

# ln /usr/bin/cc /usr/bin/gcc

Please don't use CC (uppercase) there. It's cc (lowercase). In Unix, the difference is extremely important.
 
So inside /usr/bin i must ln cc to gcc and cc and gcc are the same file.From where i take cc because in my /usr/bin i have not cc even gcc and on /usr/local/bin, i have gcc where is symlink of gcc45 (before i delete cc from /usr/bin cc was uppercase.For this reason i wrote it like that.)
 
Is it still April Fool's Day, or do you really fail to distinguish CC from cc? I gave you the proper command. Just use it.
 
Ooops.sorry!!!!when you where telling for cc i was thinking that you mean CC.I think that i make a big stupidity.
Ok.I sould make this?
Code:
cd /usr/local/bin
ln gcc45 /usr/bin/cc
cd /usr/bin
ln cc gcc
and now output of ls -ali /usr/bin/cc /usr/bin/gcc sould be
Code:
7443418 -r-xr-xr-x  5 root  wheel  264016 Mar 29 02:06 /usr/bin/cc
7443418 -r-xr-xr-x  5 root  wheel  264016 Mar 29 02:06 /usr/bin/gcc
where cc and gcc are the same file
 
Well, I hope this is the original cc/gcc, or you'll have to reinstall your system from CD.

You should now see this:

Code:
# /usr/bin/cc --version
cc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# /usr/bin/gcc --version
gcc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If so, try building world again (after a cleanworld/cleandir). This should restore everything back to normal. Please don't screw around with other versions of gcc replacing the base system compilers. If you need to use them, keep them separate and call them when needed.
 
in fact i see this:
Code:
#/usr/bin/cc --version
cc (GCC) 4.5.0 20100318 (experimental)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# /usr/bin/gcc --version
gcc (GCC) 4.5.0 20100318 (experimental)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

but
i have keeped an backup of the old gcc (4.2) on my /usr/bin named as gcc.old :)
so i made:
Code:
cd /usr/bin
ln gcc.old cc
ln cc gcc
and now output is:
Code:
/usr/bin/cc --version
cc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# /usr/bin/cc --version
cc (GCC) 4.2.1 20070719  [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and output of s -ali /usr/bin/cc /usr/bin/gcc
Code:
1036437 -r-xr-xr-x  3 root  wheel  417368 Mar 20 04:16 /usr/bin/cc
1036437 -r-xr-xr-x  3 root  wheel  417368 Mar 20 04:16 /usr/bin/gcc

You mean that always my gcc must be 4.2.1 but when i need a newer compiler i must run gcc45 from /usr/local/bin but never try to replace the default compiler with a newer?
 
Good to see you had a backup, or you would have been in muddy waters. You should be able to recompile your OS now, unless there are more sharks in those waters. Please don't mess with the base system in the future ;) There's a reason why ports and packages install in /usr/local ..
 
Back
Top