Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with --disable-alsa fails because ALSA libraries are still used #1072

Closed
simonvanderveldt opened this issue Jun 21, 2020 · 5 comments · Fixed by #1073
Closed

Building with --disable-alsa fails because ALSA libraries are still used #1072

simonvanderveldt opened this issue Jun 21, 2020 · 5 comments · Fixed by #1073

Comments

@simonvanderveldt
Copy link

When building with --disable-alsa the build fails when ALSA isn't installed because it still uses ALSA

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/pure-data-0.50_p2 --htmldir=/usr/share/doc/pure-data-0.50_p2/html --with-sysroot=/ --libdir=/usr/lib64 --disable-portaudio --disable-portmidi --disable-alsa --enable-jack --disable-fftw --disable-oss
    pd 0.50.2 is now configured

    Platform:             Linux
    Debug build:          no
    Universal build:      no
    Localizations:        yes
    Source directory:     .
    Installation prefix:  /usr

    Compiler:             x86_64-pc-linux-gnu-gcc
    CFLAGS:               -O2 -pipe -ffast-math -funroll-loops -fomit-frame-pointer -O3
    LDFLAGS:              -Wl,-O1 -Wl,--as-needed
    INCLUDES:             
    LIBS:                 -lpthread -ldl  -lrt

    External extension:   pd_linux
    External CFLAGS:      -fPIC
    External LDFLAGS:     -Wl,--export-dynamic -fPIC

    fftw:                 no
    wish(tcl/tk):         wish
    audio APIs:           JACK 
    midi APIs:            NONE!
x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"pd\" -DPACKAGE_TARNAME=\"pd\" -DPACKAGE_VERSION=\"0.50.2\" -DPACKAGE_STRING=\"pd\ 0.50.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pd\" -DVERSION=\"0.50.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MALLOC_H=1 -DHAVE_NETDB_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_SOUNDCARD_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMEB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_DUP2=1 -DHAVE_GETCWD=1 -DHAVE_GETHOSTBYNAME=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_REGCOMP=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1 -DHAVE_STRCHR=1 -DHAVE_STRERROR=1 -DHAVE_STRRCHR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_LIBDL=1 -I.  -I../portaudio/portaudio/include -I../portaudio/portaudio/src/common -I../portaudio/portaudio/src/os/unix      -DNEWBUFFER    -O2 -pipe -ffast-math -funroll-loops -fomit-frame-pointer -O3 -c -o portaudio/src/hostapi/alsa/pa_linux_alsa.o portaudio/src/hostapi/alsa/pa_linux_alsa.c
portaudio/src/hostapi/alsa/pa_linux_alsa.c:52:10: fatal error: alsa/asoundlib.h: No such file or directory
   52 | #include <alsa/asoundlib.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

This is on 0.50.2, I don't see any relevant changes for 0.51.0 but I can test it on that version as well if required.

@umlaeute
Copy link
Contributor

i think that's (partly) a "won'tfix".

the problem arises when compiling the the embedded copy of PortAudio (which also depends on ALSA).

so, if you want to build completely without ALSA, you ought to also disable the embedded copy of PortAudio.

i see that you also specify --disable-portaudio to no effect (which is the bug that needs fixing).
in the meantime you might try to also specify --without-local-portaudio

@simonvanderveldt
Copy link
Author

simonvanderveldt commented Jun 21, 2020

Ah, you're right, I wasn't paying attention, it shouldn't be compiling portaudio indeed.
Should I rename the issue?

I'll try --without-local-portaudio. And I assume the bug is that when using --disable-portaudio it shouldn't be using portaudio at all, be it a system library or the sources included with Pd, right?

@umlaeute
Copy link
Contributor

And I assume the bug is that when using --disable-portaudio it shouldn't be used portaudio at all, be it a system library or the sources included with Pd, right?

yes.

@simonvanderveldt
Copy link
Author

Just for confirmation
Including the local disables works

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/pure-data-0.50_p2 --htmldir=/usr/share/doc/pure-data-0.50_p2/html --with-sysroot=/ --libdir=/usr/lib64 --disable-portaudio --without-local-portaudio --disable-portmidi --without-local-portmidi --disable-alsa --enable-jack --disable-fftw --disable-oss
    pd 0.50.2 is now configured

    Platform:             Linux
    Debug build:          no
    Universal build:      no
    Localizations:        yes
    Source directory:     .
    Installation prefix:  /usr

    Compiler:             x86_64-pc-linux-gnu-gcc
    CFLAGS:               -O2 -pipe -ffast-math -funroll-loops -fomit-frame-pointer -O3
    LDFLAGS:              -Wl,-O1 -Wl,--as-needed
    INCLUDES:             
    LIBS:                 -lpthread -ldl  -lrt

    External extension:   pd_linux
    External CFLAGS:      -fPIC
    External LDFLAGS:     -Wl,--export-dynamic -fPIC

    fftw:                 no
    wish(tcl/tk):         wish
    audio APIs:           JACK 
    midi APIs:            NONE!

No issues when compiling.

Is portaudio/portmidi still used/is there any reason to use it?

@umlaeute
Copy link
Contributor

PA is mainly used on Mac and Win.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants