Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2011 13:50:58 +0200
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: minor regression after patching
Message-ID:  <4EF9B122.1010407@gmail.com>
In-Reply-To: <4EF92639.8070903@FreeBSD.org>
References:  <4EF88D7B.4040600@gmail.com> <CAE-mSOJx51E%2BcMGy_UytDtDBdujnzM2ZEXBBqFRTgC2VCaucng@mail.gmail.com> <4EF8E21E.10401@gmail.com> <4EF92639.8070903@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
27.12.2011 03:58, Dimitry Andric wrote:
>>>> ftpd.o: In function `pass':
>>>> /usr/src/libexec/ftpd/ftpd.c:(.text+0x2676): undefined reference to
>>>> `__FreeBSD_libc_enter_restricted_mode'
>>>> clang: error: linker command failed with exit code 1 (use -v to see
>>>> invocation)
>>>> *** Error code 1
>>>
>>> This means that linker has not found a mentioned symbol, i.e. likely
>>> you haven't updated your libc before trying to build ftpd.
>>> In this case you need to act the next order:
>>> 1) rebuild&& reinstall libc
>>> 2) rebuild&& reinstall ftpd
>>
>> Oh yes, I just remembered those sweet days I was sitting on HEAD. Each
>> build was a trial/error process.
>>
>> And I'm not seeing this when compiling world with stock gcc or on i386.
>> It looks like rather nasty clang regression.
>
> For me, stable/9 builds just fine with clang (or gcc), and the tinderbox
> isn't complaining either. Are you sure you are running buildworld,
> which is definitely necessary for this kind of upgrade?

===> libexec/ftpd (all)
clang -O2 -pipe  -DSETPROCTITLE -DLOGIN_CAP -DVIRTUAL_HOSTING 
-I/usr/src/libexec/ftpd -Dmain=ls_main 
-I/usr/src/libexec/ftpd/../../bin/ls -DINET6 -DUSE_PAM -std=gnu99 
-fstack-protector -Wsystem-headers -Wall -Wno-format-y2k 
-Wno-uninitialized -Wno-pointer-sign -c /usr/src/libexec/ftpd/ftpd.c
/usr/src/libexec/ftpd/ftpd.c:1565:3: warning: implicit declaration of 
function '__FreeBSD_libc_enter_restricted_mode' is invalid in C99 
[-Wimplicit-function-declaration]
                 __FreeBSD_libc_enter_restricted_mode();
                 ^
1 warning generated.

I totally missed this warning when reporting the problem first time.

Version.map for libc contains this function:

FBSD_1.3 {
global:
         __FreeBSD_libc_enter_restricted_mode;
} FBSD_1.2;

So the question is mainly about why 
/usr/obj/usr/src/tmp/usr/include/unistd.h was ignored in favor of 
installed one?

-- 
Sphinx of black quartz judge my vow.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EF9B122.1010407>