Can't compile pkg on mips
Bryan Drewery
bdrewery at FreeBSD.org
Fri Sep 26 14:35:48 UTC 2014
On 9/26/2014 3:18 AM, Maciej Milewski wrote:
> On 26.09.2014 05:47, Thiago Farina wrote:
>> On Thu, Sep 25, 2014 at 6:27 PM, Maciej Milewski <milu at dat.pl> wrote:
>>> On 25.09.2014 22:33, Thiago Farina wrote:
>>>> On Thu, Sep 25, 2014 at 5:27 PM, Maciej Milewski <milu at 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.
>>
> Grep shows that it's defined: Is it autodectected somehow?
>
> # grep -nr HAVE_CAPSICUM
> *
>
> config.log:3815:#define HAVE_CAPSICUM 1
> config.status:1086:D["HAVE_CAPSICUM"]=" 1"
> configure:13295:$as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h
> configure.ac:224: AC_DEFINE(HAVE_CAPSICUM, 1, [Define 1
> if you have 'capsicum'.])
> configure.bak:13295:$as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h
> libpkg/ssh.c:31:#ifdef HAVE_CAPSICUM
> libpkg/ssh.c:134:#ifdef HAVE_CAPSICUM
> pkg_config.h:17:#define HAVE_CAPSICUM 1
> pkg_config.h.in:16:#undef HAVE_CAPSICUM
> src/ssh.c:31:#ifdef HAVE_CAPSICUM
> src/ssh.c:58:#ifdef HAVE_CAPSICUM
> src/ssh.c:76:#ifdef HAVE_CAPSICUM
> src/audit.c:259:#ifdef HAVE_CAPSICUM
> src/info.c:35:#ifdef HAVE_CAPSICUM
> src/info.c:99:#ifdef HAVE_CAPSICUM
> src/info.c:265:#ifdef HAVE_CAPSICUM
> src/event.c:40:#ifdef HAVE_CAPSICUM
> src/event.c:215:#ifdef HAVE_CAPSICUM
> src/event.c:319:#ifdef HAVE_CAPSICUM
> src/updating.c:32:#ifdef HAVE_CAPSICUM
> src/updating.c:84:#ifdef HAVE_CAPSICUM
> src/updating.c:139:#ifdef HAVE_CAPSICUM
>
>
IMHO your world is out of sync. Like you have newer /usr/include than /lib.
--
Regards,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20140926/55824d10/attachment.sig>
More information about the freebsd-pkg
mailing list