[ecasound] (SOLVED!) Ported ecasound to FreeBSD 4.2

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] (SOLVED!) Ported ecasound to FreeBSD 4.2
From: Anarcat (beaupran@IRO.UMontreal.CA)
Date: Thu Dec 21 2000 - 02:59:16 EET


Hello!

I have successfully compiled and installed ecasound-1.8.5d15 on
FreeBSD 4.2-STABLE. FreeBSD has a complete "ports" and "packages"
system which is in fact a directory of recipes to compile "foreign"
software on FreeBSD. I will make an official "port" and (implicitly)
"package" of ecasound for FreeBSD as soon as I find the time.

A few things remain though. There are these cryptic (!) error messages
when linking with libecasound (about tmpname(), etc). There is this
core dump I have not yet investigated, and finally, there's the patch
that Kai Vehmanen has done, to link other eca* programs with the
*building* (new) libecasound instead of the installed (old) one.

Also, I cannot compile ecawave, but that's an altogether different
problem and will be in another mail.

I will investigate on the FreeBSD side for the cryptic messages, do
some debugging here for the crash, and will wait for your answers for
the rest.

Here are the necessary patches, with explanations.

[This patch not really necessary, config.h.in auto-generated by autoheader]
diff -r ecasound-1.8.5d15/config.h.in ecasound-1.8.5d15.port/config.h.in
54a55,57
> /* Define if you have the mlockall function. */
> #undef HAVE_MLOCKALL
>

[New patch over pthread recognition process, also check for mlockall function]
diff -r ecasound-1.8.5d15/configure.in ecasound-1.8.5d15.port/configure.in
83a84,86
> dnl ---
> dnl POSIX.4 threads
> dnl ---
85,89c88,93
< *-*-openbsd*)
< CFLAGS="$CFLAGS -pthread"
< CXXFLAGS="$CXXFLAGS -pthread"
< echo "Setting OpenBSD compilation options for POSIX threads"
< ;;

---
> dnl Not tested all cases. Cases taken from LICQ.
> dnl	*-*-openbsd*)
> dnl               CFLAGS="$CFLAGS -pthread"
> dnl               CXXFLAGS="$CXXFLAGS -pthread"
> dnl               echo "Setting OpenBSD compilation options for POSIX threads"
> dnl               ;;
96,99c100,108
< 	*-*-solaris*)
<                CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
<                echo "Setting Solaris compilation options for POSIX threads"
<                ;;
---
> dnl	*-*-solaris*)
> dnl               CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
> dnl               echo "Setting Solaris compilation options for POSIX threads"
> dnl               ;;
> 	*)
> AC_CHECK_LIB(pthread,pthread_create, [],
> 	AC_CHECK_LIB(c_r,pthread_create, [],
> 		AC_MSG_ERROR([** POSIX.4 threads not installed or broken **])))
> 		;;
125a135
> AC_CHECK_FUNCS(mlockall)
155,163d164
< 
< dnl ------------------------------------------------------------------
< 
< dnl ---
< dnl POSIX.4 threads
< dnl ---
< AC_CHECK_LIB(pthread,pthread_create, [],
< 	AC_CHECK_LIB(c_r,pthread_create, [],
< 		AC_MSG_ERROR([** POSIX.4 threads not installed or broken **])))

[this is a personal "style" patch made from a warning from gcc (something like "return from double to long int"). The thing is that the function returns a long int but a division is "casted" to a *double* instead of a long int... This is totally arguable, as I don't know these dark corners of the "new" cast facilities from C++...]

diff -r ecasound-1.8.5d15/libecasound/eca-chainsetup-position.cpp ecasound-1.8.5d15.port/libecasound/eca-chainsetup-position.cpp 46c46 < return(static_cast<double>(length_rep) / srate_rep); --- > return(static_cast<long int>(length_rep) / srate_rep); 50c50 < return(static_cast<double>(curpos_rep) / srate_rep); --- > return(static_cast<long int>(curpos_rep) / srate_rep);

[conforming to POSIX] diff -r ecasound-1.8.5d15/libecasound/eca-object-map.cpp ecasound-1.8.5d15.port/libecasound/eca-object-map.cpp 22a23 > #include <sys/types.h>

[adaptation to missing mlockall() on certain systems (notably FreeBSD)] diff -r ecasound-1.8.5d15/libecasound/eca-session.cpp ecasound-1.8.5d15.port/libecasound/eca-session.cpp 392c392 < ecadebug->msg("(eca-session) Raised-priority mode enabled. Locking memory. (prio:" + --- > ecadebug->msg("(eca-session) Raised-priority mode enabled (prio:" + 394a395 > #ifdef HAVE_MLOCKALL 399a401,403 > #else > ecadebug->msg("(eca-session) Memory locking not available."); > #endif

a.

-- Nothing is everything. -- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Dec 21 2000 - 03:59:09 EET