LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   EsounD 0.2.8 fails to compile... (https://www.linuxquestions.org/questions/linux-software-2/esound-0-2-8-fails-to-compile-222712/)

mrvikki 08-26-2004 11:57 AM

EsounD 0.2.8 fails to compile...
 
Hi I am trying to install the latest version of EsounD (0.2.8)...
I downloaded the file and unzipped it into its own directory.
I typed ./configure and everything went fine
then I typed make and get the following output...

gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -fPIC -DPIC esddsp.c -o esddsp.lo
esddsp.c: In function `open':
esddsp.c:172: error: `RTLD_NEXT' undeclared (first use in this function)
esddsp.c:172: error: (Each undeclared identifier is reported only once
esddsp.c:172: error: for each function it appears in.)
esddsp.c: In function `ioctl':
esddsp.c:373: error: `RTLD_NEXT' undeclared (first use in this function)
esddsp.c: In function `close':
esddsp.c:392: error: `RTLD_NEXT' undeclared (first use in this function)
make: *** [esddsp.lo] Error 1
bash-2.05b$


Any ideas how to fix? Thanks...

ssokolow 09-02-2004 09:01 AM

For some reason (I haven't looked into it yet) eSound does include dlfcn.h which is where RTLD_NEXT comes from, however it doesn't pick up RTLD_NEXT from it.

The temporary solution I found was to manually add the defnition line above the #define for REAL_LIBC before I compile it. (although this is probably too much of a hack to be added to the official source code)

Here's the relevant change from esddsp.c:
Code:

# --- The line below this one was copied from from /usr/include/dlfcn.h to esddsp.c
# define RTLD_NEXT      ((void *) -1l)

#define REAL_LIBC RTLD_NEXT

although, since esddsp is just a tool to redirect /dev/dsp through esound at your whim, you could also just edit the Makefile to prevent it from compiling. It's technically optional and it's only used to force binary-only programs to use eSound rather than OSS.

whschimmel 02-20-2005 01:30 PM

this one may be deleted by a moderator

davekok 03-05-2005 04:17 AM

EsounD
 
It apears you have to compile the code with the _GNU_SOURCE option e.g.:
export CFLAGS="-D_GNU_SOURCE"
./configure
make
make install

The header file features.h turns off all options and without the __USE_GNU option RTLD_NEXT will never be defined. Passing features.h the _GNU_SOURCE option will turn on the _USE_GNU option.


All times are GMT -5. The time now is 12:09 PM.