Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2000 14:37:04 -0500
From:      Anarcat <beaupran@IRO.UMontreal.CA>
To:        will@physics.purdue.edu
Cc:        beaupran@IRO.UMontreal.CA, freebsd-ports@FreeBSD.ORG
Subject:   Re: Porting ecasound suite to FreeBSD
Message-ID:  <874rzv7wv3.wl@localhost.anarcat.yi.org>
In-Reply-To: In your message of "Sat, 23 Dec 2000 01:13:05 -0500" <20001223011305.U328@argon.firepipe.net>
References:  <87puilbdwu.wl@localhost.anarcat.yi.org> <20001221224539.J328@argon.firepipe.net> <874rzwidpz.wl@localhost.anarcat.yi.org> <20001223011305.U328@argon.firepipe.net>

next in thread | previous in thread | raw e-mail | index | archive | help
At Sat, 23 Dec 2000 01:13:05 -0500,
Will Andrews <will@physics.purdue.edu> wrote:
> 
> On Fri, Dec 22, 2000 at 12:10:32PM -0500, Anarcat wrote:
> > Humm.. I agree. But FreeBSD way is kinda strange. Why doesn't it use
> > the '-lpthread' syntax? Autoconf has "problems" detecting libs that
> > are not link with -l<libname>. Actually, it's more a problem of not
> > having the good macro available..
> 
> I don't really know why it does it that way.  You'll have to ask Jason
> Evans, the pthread (libc_r) maintainer.  I've never really understood
> why pthread was put in a library called "c_r" instead of "pthread",
> among a few other things.

To a certain extent, I really don't care. :) The Only "problem" is
that autoconf script, "out of the box", are designed to test for a
library 'y' by using '-ly'. This is hard-coded. So to test the library
'pthread' using '-pthread' is kinda akward...
 
> > But I fixed the scripts. Unfortunatly, since my fixes go back to
> > ecasound's main source it has to be in LICQ's style:
> > 
> > case "$host" ...
> >         freebsd)
> >                 CFLAGS...
> > 
> > This is annoying. Is there a better way?
> 
> perl -pi -e "s@-lpthread@-pthread@g" ${WRKSRC}/configure
> in your port Makefile.  Sure, it's a hack, but it works (usually).  The
> configure script should have the necessary autoconf hooks to check for
> -pthread on FreeBSD.. some projects already have this sort of thing.

I prefer my hack. :) I think I should write a generic autoconf macro
to test for libs without having '-l' hardcoded...
 
> > I know it's there. The problem occurs upon link. 
> 
> It would be nice to see the exact error.

Sorry (that is before the "no -lc_r" fix but it doesn't change anything..):

c++ -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops -pthread -o ecasound eca-text.o textdebug.o -lncurses -L../libecasound/.libs -lecasound -L../kvutils/.libs -lkvutils -lhistory -lreadline -lc_r -lm
../libecasound/.libs/libecasound.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so.4: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so.4: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so.4: warning: mktemp() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so.4: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so.4: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is stupid.
/usr/lib/libc.so.4: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider using mkstemp()
../libecasound/.libs/libecasound.so: undefined reference to `mlockall'
 
> > Also, there's no mlockall man page. Is there a reason (e.g. "secret
> > function" :)?
> 
> There are plenty of undocumented function calls in FreeBSD, just like
> any other operating system.

Interesting. 
 
> > Well-well-well.. It seems you're right! I have no idea how their
> > libtool stuff works, in fact, I know *nothing* about libtool. One
> > thing I know though... libtool is installed on my system
> > (/usr/local/bin/libtool) and the makefiles are usings the package's
> > libtool! And this one adds annoying -lc and -lc_r libs! 
> > 
> > Fixed. 
> 
> Yeah, libtool is pretty stupid when it comes to FreeBSD.  Thankfully,
> this problem is not usually caused by libtool.  Sometimes it is,
> usually not.

Well.. The libtool supplied with the package was _really_
stupid. /usr/local/bin/libtool wasn't that bad. At least it did not
put -lc and -lc_r.

For a program designed to make porting shared libs easy, frankly, that
sucks. :)
 
> > Ah-ah! I knew there was something I was missing. This is the first
> > "major" port I do (pthreads, libtool, messy dependencies...), so I
> > knew I was missing some stuff.
> 
> Quite an experience, isn't it?

Mad. I spent about 15 hours on this thing.

> > Thanks a lot for your help, you can expect a port to pop up in PRs
> > soon enough. :)
> 
> Sure.

It's there alright.. with no MASTER_SITES! Yeah... That's the last of
the 15 hours... :))

Anyways, thanks for everything

A.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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