Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2008 08:27:16 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: undefined reference to SYS_cpuset
Message-ID:  <217498.53801.qm@web57001.mail.re3.yahoo.com>
In-Reply-To: <Pine.GSO.4.64.0807281051390.12364@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--- On Mon, 7/28/08, Daniel Eischen <deischen@freebsd.org> wrote:

> From: Daniel Eischen <deischen@freebsd.org>
> Subject: Re: undefined reference to SYS_cpuset
> To: "Unga" <unga888@yahoo.com>
> Cc: freebsd-stable@freebsd.org
> Date: Monday, July 28, 2008, 10:58 PM
> On Mon, 28 Jul 2008, Unga wrote:
> 
> > --- On Mon, 7/28/08, Daniel Eischen
> <deischen@freebsd.org> wrote:
> >
> >> From: Daniel Eischen <deischen@freebsd.org>
> >> Subject: Re: undefined reference to SYS_cpuset
> >> To: "Unga" <unga888@yahoo.com>
> >> Cc: ps@freebsd.org, brooks@freebsd.org,
> freebsd-stable@freebsd.org, jhb@freebsd.org
> >> Date: Monday, July 28, 2008, 10:26 PM
> >> On Mon, 28 Jul 2008, Unga wrote:
> >>
> >>> --- On Mon, 7/28/08, Daniel Eischen
> >> <deischen@freebsd.org> wrote:
> >>>
> >>>> From: Daniel Eischen
> <deischen@freebsd.org>
> >>>> Subject: Re: undefined reference to
> SYS_cpuset
> >>>> To: "Unga"
> <unga888@yahoo.com>
> >>>> Cc: freebsd-stable@freebsd.org
> >>>> 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.
> >>
> >> The only supported way is to buildkernel and
> buildworld.
> >> You're on your
> >> own if you choose not to go along with the
> procedure in
> >> src/UPDATING.
> >>
> >
> > That may the only way you know how build FreeBSD :(
> 
> No, it's not the only way *I* know how to, but if you
> aren't
> going to follow UPDATING, then *you* are expected to figure
> it out :-)
> 

That's good if you know there are many ways of doing the same thing. I have never seen anywhere that this mailing list is ONLY for people who follow UPDATING. There are many who just use parts of the FreeBSD for their projects, and in return fund the FreeBSD project and offer employment to developers. 


> Your problem is that you don't have an up-to-date
> kernel src
> (src/sys) directory with includes in your build
> environment.

I have nothing to do with src/sys. I link against FreeBSD libs for a long time, it just today onwards did not work. That's all.

> Your libc is being built against an old set of includes, so
> it is up to you how to want to modify your build
> environment
> to account for this.
> 

I install FreeBSD includes from /usr/src/include and libs from /usr/src/lib. From the today onwards if the make in /usr/src/include does not install all the headers required for libs building that should be clearly documented and notified prominently, that I don't see it in UPDATING or any where.

FYI, my libc is build against the **latest** set of includes installed by the make in the /usr/src/include and nothing but that, ie, there are no other headers in /mypath/include, the compilation and installation of libc goes **without** any error. So that "Your libc is being built against an old set of includes" is just pure nonsense, and stupid statement made without knowing what people are doing.

Unga 

Unga





      



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