Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Sep 2014 00:47:07 -0300
From:      Thiago Farina <tfransosi@gmail.com>
To:        Maciej Milewski <milu@dat.pl>
Cc:        "pkg@FreeBSD.org" <pkg@freebsd.org>, Bryan Drewery <bdrewery@freebsd.org>
Subject:   Re: Can't compile pkg on mips
Message-ID:  <CACnwZYe1-vHicq6AirPLVu3UconMXxe5e9Ku=9d8C8X_iNn2sg@mail.gmail.com>
In-Reply-To: <542488B9.6090700@dat.pl>
References:  <54233771.4090803@dat.pl> <CACnwZYdDu9wXMzs4hvPEXhW=Mdpy6san1iLNE5sNri6=5KG7sg@mail.gmail.com> <057b903c-628f-4843-b7de-c0f7cb9750b4@email.android.com> <5424425A.9040709@FreeBSD.org> <54247A94.6090901@dat.pl> <CACnwZYfSrV4_qau1mTtmM_0a6wK=qKAb5JZnKOD-=L-ML9kS2g@mail.gmail.com> <542488B9.6090700@dat.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 25, 2014 at 6:27 PM, Maciej Milewski <milu@dat.pl> wrote:
> On 25.09.2014 22:33, Thiago Farina wrote:
>> On Thu, Sep 25, 2014 at 5:27 PM, Maciej Milewski <milu@dat.pl> wrote:
>>>> What FreeBSD version is this?
>>>>
>>> FreeBSD RSPRO 10.0-CURRENT FreeBSD 10.0-CURRENT #9 r253582+713ffac
>>>
>>> after manual edit src/Makefile and removing -Werror compilation went few
>>> lines further:
>>> ===>  Building for pkg-1.3.8
>>> /usr/bin/make  all-recursive
>>> Making all in external
>>> /usr/bin/make  all-am
>>> Making all in libpkg
>>> Making all in repo
>>> Making all in binary
>>> Making all in .
>>> Making all in src
>>>   CCLD     pkg
>>> pkg-info.o: In function `exec_info':
>>> info.c:(.text+0x5ac): undefined reference to `cap_rights_init'
>>> pkg-ssh.o: In function `exec_ssh':
>>> ssh.c:(.text+0x160): undefined reference to `cap_rights_init'
>>> pkg-updating.o: In function `exec_updating':
>>> updating.c:(.text+0x334): undefined reference to `cap_rights_init'
>>> *** [pkg] Error code 1
>>>
>> Can you do `grep -Rn cap_rights_limit . `, to figure out where
>> "cap_rights_limit" is?
>>
>> It is missing either a ".a" or ".o" where this symbol is, hence it
>> isn't linking.
>>
>> Not your fault though.
> Sure I can:
> /data/builds/usr/ports/ports-mgmt/pkg/work/pkg-1.3.8# grep -Rn
> cap_rights_limit .
> ./src/ssh.c:78: if (cap_rights_limit(fd, &rights) < 0 && errno != ENOSYS ) {
> ./src/ssh.c:79:         warn("cap_rights_limit() failed");
> ./src/info.c:267:               if (cap_rights_limit(fd, &rights) < 0 &&
> errno != ENOSYS ) {
> ./src/info.c:268:                       warn("cap_rights_limit() failed");
> ./src/updating.c:141:   if (cap_rights_limit(fileno(fd), &rights) < 0 &&
> errno != ENOSYS ) {
> ./src/updating.c:142:           warn("cap_rights_limit() failed");
> Binary file ./src/pkg-info.o matches
> Binary file ./src/pkg-ssh.o matches
> Binary file ./src/pkg-updating.o matches
>
Do you have HAVE_CAPSICUM defined? It needs to be defined in order to
sys/capability.h to get included.

But I think that does not explain the link issue. It is weird that it
is not finding something from libc.

-- 
Thiago Farina



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACnwZYe1-vHicq6AirPLVu3UconMXxe5e9Ku=9d8C8X_iNn2sg>