Re: [ecasound] problems linking ecawave on FreeBSD

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] problems linking ecawave on FreeBSD
From: The Anarcat (anarcat_AT_anarcat.dyndns.org)
Date: Mon Sep 24 2001 - 08:05:07 EEST


On Mon, 10 Sep 2001, Kai Vehmanen wrote:

> Hi,
>
> On Fri, 24 Aug 2001, The Anarcat wrote:
>
> > I am now trying to compile ecawave (again). The first problem I stumbled
> > upon is that ecawave is not linking with the proper qt library on fbsd
> > here. Here, to link with qt2 you have to specify -lqt2, not -lqt.
> [...]
> > I have attached patches to the Makefiles that fix this issue.
>
> This a tricky one. As Junichi already mentioned, we can't apply this patch
> directly as it would break most other platforms. If you install
> Qt from the official source package, you'll get libqt.so .. libtool
> versioning takes care of version troubles.

Let's just say I'm not exactly familiar with libtool. :)

> I'm not sure why FreeBSD
> installs Qt2.x as -lqt2, but on the other hand it's not the only platform
> that does it... (some trouble with libtool?).

I don't know, exactly. I guess I should talk to Qt maintainer.

> Hmm, how about something like "LIBS=-lqt2 ./configure" for the fbsd port?

I will try that. But wouldn't ./configure make LIBS=-lqt -lqt2?

> > The second problem I had is with the eternal -pthread flag on FreeBSD.
> > You need it to link with pthreaded apps. And ecasound is one. And
> > ecasound-config --libs, for some reason, doesn't give -pthread in the
> > list. So I had to include that in the patch too.
>
> This is best handled in ecawave's configure-script (just take the
> thread-setup from ecasound's configure.in).

Ok. I had some problems duplicating the code in there ($host is NONE for
some reason), so the patch is simply:

--- configure.in.orig Sun Jun 17 12:48:37 2001
+++ configure.in Mon Sep 24 00:34:41 2001
@@ -40,6 +40,30 @@
 fi
 
 dnl ---
+dnl Set up some operating system specific options for POSIX threads
+dnl ---
+dnl case "$host" in
+dnl *-*-openbsd*)
+dnl CFLAGS="$CFLAGS -pthread"
+dnl CXXFLAGS="$CXXFLAGS -pthread"
+dnl echo "Setting OpenBSD compilation options for POSIX threads"
+dnl ;;
+dnl *-*-freebsd*)
+ CFLAGS="$CFLAGS -pthread"
+ CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+ CXXFLAGS="$CXXFLAGS -pthread"
+ echo "Setting FreeBSD compilation options for POSIX threads"
+dnl ;;
+dnl *-*-solaris*)
+dnl CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
+dnl echo "Setting Solaris compilation options for POSIX threads"
+dnl ;;
+dnl *)
+dnl echo "Using generic settings for POSIX thread support."
+dnl ;;
+dnl esac
+
+dnl ---
 dnl Check for qt
 dnl ---
 AC_PATH_QT_2

> > So now I can compile it. And run it! :) But when I start it, I have the
> > message: "Warning! Can't access temporary directory
> > /tmp/ecawave-anarcat. Ecawave may not work properly." The thing is that
> > the directory is there. It exists...
>
> This is probably caused by the new temporary directory creation code in
> 'ecasound/kvutils/temporary_file_directory.h'.

Yes.

> What does "stat /tmp/ecawave-anarcat" look like?

Well now I have another problem. The directory doesn't exist anymore.
Isn't ecawave supposed to create it?

What's worse, ecawave *deletes it*!!! This is really odd.

You mean stat as in:

anarcat_AT_shall [ecawave]$ stat /tmp/ecawave-anarcat/
  File: "/tmp/ecawave-anarcat/"
  Size: 512 Allocated Blocks: 2 Filetype: Directory
  Mode: (0755/drwxr-xr-x) Uid: (1000/anarcat) Gid: (0/wheel)
Device: 226308 Inode: 6598 Links: 2
Access: Mon Sep 24 00:44:19 2001
Modify: Mon Sep 24 00:44:19 2001
Change: Mon Sep 24 00:44:19 2001

> I suspect geteuid() or getegid()
> functions work differently between fbsd and linux. You can test this by
> uncommencting the debug code in
> 'ecasound/kvutils/temporary_file_directory.h' (lines 100, 105, and so on)
> and recompile and reinstall libkvutils.

(kvutils) st_gid doesn't match.

Are these checks really necessary?

anarcat_AT_shall [ecasound]$ mkdir /tmp/b
anarcat_AT_shall [ecasound]$ stat /tmp/b
  File: "/tmp/b"
  Size: 512 Allocated Blocks: 2 Filetype: Directory
  Mode: (0755/drwxr-xr-x) Uid: (1000/anarcat) Gid: (0/wheel)
Device: 226308 Inode: 6598 Links: 2
Access: Mon Sep 24 00:59:03 2001
Modify: Mon Sep 24 00:59:00 2001
Change: Mon Sep 24 00:59:00 2001

anarcat_AT_shall [ecasound]$ id
uid=1000(anarcat) gid=1000(anarcat) groups=1000(anarcat), 0(wheel)
anarcat_AT_shall [ecasound]$

I guess this is not really a requisite for a temporary directory, no?
Shouldn't kvutils use a function such as mkstemp or mkdtemp?

http://www.FreeBSD.org/cgi/man.cgi?query=mkdtemp

> > This really looks promising. Is it possible to make multi-track mixing
> > with ecawave? This is mostly why I would use it. I mainly need it to mix
> > seperate wave files together and "align" them on arbitrary boundaries.
>
> From Dave's Sound&MIDI pages:
> - http://www.bright.net/~dlphilp/linuxsound/snded.html

Thanks for the link! I am making a port of audacity right now! :)

A.


--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Sep 24 2001 - 08:02:13 EEST