Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Dec 2000 17:36:01 -0500
From:      Anarcat <beaupran@IRO.UMontreal.CA>
To:        freebsd-ports@freebsd.org
Subject:   Porting ecasound suite to FreeBSD
Message-ID:  <87puilbdwu.wl@localhost.anarcat.yi.org>

next in thread | raw e-mail | index | archive | help
Hello!

[Please CC: I'm not on the list]
[I should have posted here 3 months ago.]

I am in the process of porting the ecasound sound processing suite
(www.ecasound.org) to FreeBSD (here is 4.2-STABLE). It's really seems
to be a fine product, and runs on Linux, for now. :)

Ecasound is a command-line tool and a library that is the basis for a
few other packages. There is QtEcasound (a Qt GUI) and ecawave (a wave
editor that uses QtEcasound libs). For the rest of the hype about
ecasound, see the webpage. :) That said, it's very nice and I want it
on FreeBSD. :)

I have "successfully" ported ecasound-1.8.5d15. The quotes are because
there are some things that are _really_ wrong. I get all sorts of
warnings when linking the library itself. Ok. Let's go.

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. 

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
kernel modules, but never in a lib. Anyways:

 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'

So I had to add a "AC_CHECK_FUNCS(mlockall)" and a #ifdef around the
call to fix this. (I took this from the mysqld port).

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!

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?

Anyways, I was able to compile the program, the libs, and all the
stuff... That is, I installed the libs in /usr/local/lib and did a
ldconfig to refresh that. After that, I tried to compile
qtecasound. And there comes the weird part:

c++ -lecasound -lkvutils -pthread test.c -o test 

does not link, but

c++ -L/usr/local/lib -lecasound -lkvutils -pthread test.c -o test

does. That is, in the first, I get something like:

/usr/libexec/elf/ld: cannot find -lecasound

But it's there:
$ ldconfig -r | grep ecasound
	232:-lecasound.7 => /usr/local/lib/libecasound.so.7
	254:-lecasoundc.0 => /usr/local/lib/libecasoundc.so.0
$

Yukl. Weird. So that's all i can do for now...

Have a nice day!

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?87puilbdwu.wl>