Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 2000 12:10:32 -0500
From:      Anarcat <beaupran@IRO.UMontreal.CA>
To:        will@physics.purdue.edu
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: Porting ecasound suite to FreeBSD
Message-ID:  <874rzwidpz.wl@localhost.anarcat.yi.org>
In-Reply-To: In your message of "Thu, 21 Dec 2000 22:45:39 -0500" <20001221224539.J328@argon.firepipe.net>
References:  <87puilbdwu.wl@localhost.anarcat.yi.org> <20001221224539.J328@argon.firepipe.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[Please CC: I'm not on the list]

At Thu, 21 Dec 2000 22:45:39 -0500,
Will Andrews <will@physics.purdue.edu> wrote:
> 
> On Thu, Dec 21, 2000 at 05:36:01PM -0500, Anarcat wrote:

[...]

> > First, there is the eternal pthread nightmare. I had to patch the
> > configure scripts to make them use '-pthread' and add '-D_THREAD_SAFE'
> > to compilation. 
> 
> pthread is only a nightmare because of the lack of a standard as to how
> to link with it properly.  And even then a simple perl regex command can
> fix a configure script.

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..

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?
 
> > Second, I can't find mlockall() on FreeBSD. It's declared in
> > /usr/include/sys/mmap.h (AFAIR). It's supposed to be
> > POSIX.1b. Grepping through /usr/src, I found it in the kernel and some
> 
> #include <sys/mman.h>

I know it's there. The problem occurs upon link. 

Also, there's no mlockall man page. Is there a reason (e.g. "secret
function" :)?
 
> > Ok. Let's come back on these "libc" warnings. I don't get
> > it. setkey(3) *is* present on my system. It's a plain 4.2-STABLE
> > install, for Knuth's sake! There is not a single occurence of
> > mktemp() or f_prealloc() in ecasound's source!! There is, however, an
> > occurence of gets() in ecasound's readline lib. But I disabled it!
> 
> The problem lies with the fact your makefile makes it link explicitly
> with -lc_r.  You are _not_ supposed to do this - gcc takes care of
> linking with the standard libraries (e.g. -lc, -lc_r, and others).

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. 
 
> > For tmpnam(), it *is* used in the code. However, mkstemp() *cannot*
> > be used since tmpnam() is used to generate a name for a
> > *fifo*. mkstemp() creates a file. What do I do with this mess?
> 
> You use mkfifo() to make the fifo.  I found the tmpnam() call in the
> code.. not sure how it can be integrated into the code.  Probably better
> just to ignore the warning.

I guess this would go to -audit. :) These guys would probably have a
fix or create one. :) I can't believe that there is no secure way to
create a fifo!
 
[...]
 
> This is to be expected.
> It's the standard way you do things.  The compiler must be told where
> the libraries are if they are not in the standard library search paths
> (usually just /usr/lib).  Or else you'll run into a huge mess of
> namespace conflicts.

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.

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

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?874rzwidpz.wl>