Re: undefined reference to SYS_cpuset



--- On Mon, 7/28/08, Daniel Eischen <deischen@xxxxxxxxxxx> wrote:

From: Daniel Eischen <deischen@xxxxxxxxxxx>
Subject: Re: undefined reference to SYS_cpuset
To: "Unga" <unga888@xxxxxxxxx>
Cc: freebsd-stable@xxxxxxxxxxx
Date: Monday, July 28, 2008, 9:19 PM
On Mon, 28 Jul 2008, Unga wrote:

Hi all

Today (28th July) I upgraded the FreeBSD sources
(/usr/src) using
cvsup and when try to compile a test C program I get
following:

echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose

/usr/lib/libc.so: undefined reference to
`SYS_cpuset_getaffinity'
/usr/lib/libc.so: undefined reference to
`SYS_cpuset'
/usr/lib/libc.so: undefined reference to
`SYS_cpuset_setaffinity'
/usr/lib/libc.so: undefined reference to
`SYS_cpuset_getid'
/usr/lib/libc.so: undefined reference to
`SYS_cpuset_setid'
/usr/lib/libc.so: undefined reference to
`SYS_setfib'
collect2: ld returned 1 exit status

I can see in logs following programs compiled without
any error:
cpuset_getaffinity.S
cpuset.S
cpuset_setaffinity.S
cpuset_getid.S
cpuset_setid.S
setfib.S

What's gone wrong now? Am I in the middle of a
FreeBSD update? or have
I made some mistake? or multiple routing tables update
on 20080724
broken something? Any ideas?

Did you build and install the kernel first?


I have compiled and installed **only** following to a separate location:
- FreeBSD Headers
- lib/csu
- lib/libc
- lib/msun
- lib/libc_r

And tested with a simple script whether I can compile and link against new libs successfully before I can proceed with my project. That test, as mentioned in the original post, failed to link against the new C libraries. That is, it looks to me, the libc is now broken.

Of course, the system I'm running is old, uname -a shows May 25. I don't think I have to run the latest kernel for me to separately link against a different copy of libc, do I?

If there a fix or a patch, I can apply against the libc and let you guys know the result.

Unga




_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Porting software to FreeBSD 5.2.1
    ... the FreeBSD libc and preferably the Linux/GNU libc sadly this is my first ... you will se that there is a bsd port in progress right now but the truth is ... > Well, Linux is not FreeBSD. ... It helps if you have an intimate knowledge of the FreeBSD ...
    (freebsd-questions)
  • Re: Porting software to FreeBSD 5.2.1
    ... Well, Linux is not FreeBSD. ... The libc version number in FreeBSD is the same as the major version ... compile, but that differ in subtle but significant ways in operation. ...
    (freebsd-questions)
  • Re: The optimization of malloc(3): FreeBSD vs GNU libc
    ... I was astonished by the real repeatable performance difference on ... FreeBSD libc. ... defined to use mallocprovided by FreeBSD 6.1. ... His program uses mallocto obtain so many small memory blocks. ...
    (freebsd-hackers)
  • Re: The optimization of malloc(3): FreeBSD vs GNU libc
    ... I was astonished by the real repeatable performance difference on ... FreeBSD libc. ... defined to use mallocprovided by FreeBSD 6.1. ... His program uses mallocto obtain so many small memory blocks. ...
    (freebsd-hackers)
  • Re: [OT?] write C program with UTF16LE
    ... Not even if you're using the Linux devtools to create a ... You're using the FreeBSD system libc. ... Same API, ...
    (freebsd-questions)