Bug #550

installworld crt1.o regression?

Added by c.turner almost 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

hello..

Reviewing my (jailed) 1.8 pkgsrc bulk

good news:

stayed up for the run,
which is 2+ days of jailed Vinum Striping on the ol' P-II :)
(not that I expected otherwise - dont want to be a whiner :)

bad news:

fsf emacs failed due to lack of /usr/lib/crt1.o ..

Recalling someone discussing this on the lists,
but couldn't find the thread after about 45min of searching..
so please excuse if this is point-release spam :)

tried to make a fresh jail as described in jail(8) to see
if I missed a step, and it's still not there..

then I checked the host /usr/lib which was incrementally upgraded from
1.6 just after the branch, and noticed that:

-r--r--r-- 1 root wheel 1431 Jan 4 02:21 /usr/lib/crt1.o
-r--r--r-- 1 root wheel 2113 Jan 4 02:21 /usr/lib/crtbegin.o
-r--r--r-- 1 root wheel 2300 Jan 4 02:21 /usr/lib/crtbeginS.o
-r--r--r-- 1 root wheel 865 Jan 4 02:21 /usr/lib/crtend.o
-r--r--r-- 1 root wheel 865 Jan 4 02:21 /usr/lib/crtendS.o
-r--r--r-- 1 root wheel 657 Jan 4 02:21 /usr/lib/crti.o
-r--r--r-- 1 root wheel 621 Jan 4 02:21 /usr/lib/crtn.o
-r--r--r-- 1 root wheel 1411 Jan 27 01:18 /usr/lib/gcc34/crt1.o
-r--r--r-- 1 root wheel 1836 Jan 27 01:18 /usr/lib/gcc34/crtbegin.o
-r--r--r-- 1 root wheel 2352 Jan 27 01:18 /usr/lib/gcc34/crtbeginS.o
-r--r--r-- 1 root wheel 1196 Jan 27 01:18 /usr/lib/gcc34/crtend.o
-r--r--r-- 1 root wheel 1388 Jan 27 01:18 /usr/lib/gcc34/crtendS.o
-r--r--r-- 1 root wheel 657 Jan 27 01:18 /usr/lib/gcc34/crti.o
-r--r--r-- 1 root wheel 621 Jan 27 01:18 /usr/lib/gcc34/crtn.o
-r--r--r-- 1 root wheel 1548 Jan 27 01:18 /usr/lib/gcc34/gcrt1.o
-r--r--r-- 1 root wheel 1568 Jan 4 02:21 /usr/lib/gcrt1.o

(see: listing dates)

Just to make sure I didn't miss a commit affecting this
since the branch, synched to latest -r 1_8_Slip,
quickworld-ed, re-jailed, no-go.

# ls -la jails/test/usr/lib/{*crt*,gcc34/*crt*}
ls: jails/test/usr/lib/*crt*: No such file or directory
-r--r--r-- 1 root wheel 1411 Jan 31 04:13 jails/test/usr/lib/gcc34/crt1.o
-r--r--r-- 1 root wheel 1836 Jan 31 04:13 jails/test/usr/lib/gcc34/crtbegin.o
-r--r--r-- 1 root wheel 2352 Jan 31 04:13 jails/test/usr/lib/gcc34/crtbeginS.o
-r--r--r-- 1 root wheel 1196 Jan 31 04:13 jails/test/usr/lib/gcc34/crtend.o
-r--r--r-- 1 root wheel 1388 Jan 31 04:13 jails/test/usr/lib/gcc34/crtendS.o
-r--r--r-- 1 root wheel 657 Jan 31 04:13 jails/test/usr/lib/gcc34/crti.o
-r--r--r-- 1 root wheel 621 Jan 31 04:13 jails/test/usr/lib/gcc34/crtn.o
-r--r--r-- 1 root wheel 1548 Jan 31 04:13 jails/test/usr/lib/gcc34/gcrt1.o

cvs delta since host system installworld, for reference:

# grep -v '^cvs' system-checkout-release-2007-01-30.log
U src/sbin/jscan/jscan.c
? src/sys/config/ONENINE_VKERNELv18
? src/sys/config/ONENINE_VKERNELv18-nodebug
? src/sys/config/ONENINEv18
? src/sys/dev/netif/acx/cvs.core
M src/sys/dev/virtual/disk/vdisk.c
? src/sys/dev/virtual/disk/vdisk.c.mine
U src/sys/kern/vfs_syscalls.c
M src/sys/platform/vkernel/include/md_var.h
M src/sys/platform/vkernel/platform/init.c

none of which looks to me like it would affect this particular portion
of things.. so it might be more than jails having the problem.

crt0 is hardlinked in the jail for now..

Thanks,

- Chris

History

#1 Updated by corecode almost 8 years ago

you mean it fails on compilation?

we moved the crt* stuff to their own compiler specific directories. however, if you link your binary with "cc", this does not produce any problem, because the new compilers also use the new path.

cheers
simon

#2 Updated by c.turner almost 8 years ago

looking a bit further at the build,
I suppose the problem could more directly be blamed on emacs..

I just recalled a recent discussion about crt1.o recently &
thought the previous discussion involved getting crt1.o into
"/usr/lib/." so I wanted to check here -

not sure what POSIX / etc. have to say about this, but if
a 'crt' file isn't required, I'll submit against pkgsrc and / or
upstream as per the usual procedure for pkgsrc errors.

sorry to spam if so..

Thanks,

- Chris

--8<--

cd src; /usr/pkg/bin/gmake all \
CC='cc' CFLAGS='-O2 -fno-zero-initialized-in-bss
-I/usr/pkg/include -I/usr/pkg/xorg/include -I/usr/include
-I/usr/pkg/include/freetype2' CPPFLAGS='-I/usr/pkg/include
-I/usr/pkg/xorg/include -I/usr/include -I/usr/pkg/include/freetype2' \
LDFLAGS='-Wl,-z,nocombreloc -L/usr/pkg/xorg/lib
-Wl,-R/usr/pkg/xorg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib
-Wl,-R/usr/lib -L/usr/pkg/xorg/lib' MAKE='/usr/pkg/bin/gmake'
gmake[1]: Entering directory
`/usr/pkgsrc/editors/emacs/work.pkgsrc-dfly18-2006Q4/emacs-21.4/src'
cc -c -I/usr/pkg/include -I/usr/pkg/xorg/include -I/usr/include
-I/usr/pkg/include/freetype2 -Demacs -DHAVE_CONFIG_H -DUSE_LUCID -I.
-I/usr/pkgsrc/editors/emacs/work.pkgsrc-dfly18-2006Q4/emacs-21.4/src
-I/usr/pkg/xorg/include -O2 -fno-zero-initialized-in-bss
-I/usr/pkg/include -I/usr/pkg/xorg/include -I/usr/include -I/usr/pkg/include/freetype2 pre-crt0.c
gmake[1]: *** No rule to make target `/usr/lib/crt1.o', needed by
`temacs'. Stop.
gmake[1]: Leaving directory
`/usr/pkgsrc/editors/emacs/work.pkgsrc-dfly18-2006Q4/emacs-21.4/src'
gmake: *** [src] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/editors/emacs
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/editors/emacs

Please view the work log for emacs-21.4anb7

BULK> emacs-21.4anb7 was marked as broken:
-rw-r--r-- 1 root wheel 33359 Jan 28
11:48 /usr/pkgsrc/editors/emacs/.broken.pkgsrc-dfly18-2006Q4.html
/usr/pkg/bin/bmake deinstall
===> deinstall [emacs-21.4anb7] ===> Deinstalling for emacs-21.4anb7

On Wed, 31 Jan 2007 08:40:19 +0100
"Simon 'corecode' Schubert" <> wrote:

#3 Updated by TGEN almost 8 years ago

It is required to setup the C environment for the actual C program, for
any program basically. I don't know why it insists on having
/usr/lib/crt1.o though.

Cheers,
--
Thomas E. Spanjaard

#4 Updated by dillon almost 8 years ago

:c.turner wrote:
:> not sure what POSIX / etc. have to say about this, but if
:> a 'crt' file isn't required, I'll submit against pkgsrc and / or
:> upstream as per the usual procedure for pkgsrc errors.
:
:It is required to setup the C environment for the actual C program, for
:any program basically. I don't know why it insists on having
:/usr/lib/crt1.o though.
:
:Cheers,
:--
: Thomas E. Spanjaard
:

No application build should ever specify crt1 manually. I don't
know why temacs insists on doing so.

-Matt
Matthew Dillon
<>

#5 Updated by c.turner almost 8 years ago

on closer inspection definately looks to be some elisp related cruft..

thanks! normally wouldn't have bothered on this list.
just remembered the other crt thread which I couldn't find
for reference - will submit a patch upstream sometime soon.

in any case, in case anyone is wondering:

(impending vi/emacs flame war disclaimer: I use both)

looks like the pre-crt0.c sets up a 'data_start' symbol in
front of crt0.o which explains the link order and borked target.
The symbol is then used various flavors of the 'unexec'
function/program, which is designed essentially to generate an object
file from the running process.

this looks to be used to generate the initial emacs (temacs?)
which then interprets a bunch of elisp, and calls 'dump-emacs',
which says in the *Help*

---
dump-emacs is a built-in function.
(dump-emacs FILENAME SYMFILE)

Dump current state of Emacs into executable file FILENAME.
Take symbols from SYMFILE (presumably the file you executed to run
Emacs). This is used in the file `loadup.el' when building Emacs.

You must run Emacs in batch mode in order to dump it.
---

so.. some elisp interpreter trickery essentially - might
affect other non-gnu code generator type things, but probably
not worth the support. wondering if this will break my
unsubmitted SBCL port.. hmm.. time for some tests.

On Wed, 31 Jan 2007 10:56:25 -0800 (PST)
Matthew Dillon <> wrote:

Also available in: Atom PDF