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

Can't compile apulse under Devuan GNU/Linux :( #97

Open
asbestomolesto opened this issue Feb 13, 2019 · 7 comments
Open

Can't compile apulse under Devuan GNU/Linux :( #97

asbestomolesto opened this issue Feb 13, 2019 · 7 comments

Comments

@asbestomolesto
Copy link

Hi there, I can't compile apulse, I think there's something about glib.

I tried this, from another thread here, but I have the same error as before.

d=apulse && cd /tmp && git clone git://github.com/i-rinat/$d.git && cd $d && F="-m32 -march=native -msse3 -O3 -fomit-frame-pointer -pipe -DNDEBUG" && PKG_CONFIG_PATH=/usr/lib/pkgconfig cmake -LA -DCMAKE_C_FLAGS_RELEASE="$F" -DCMAKE_CXX_FLAGS_RELEASE="$F" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && make -j4

and this is what happens:

root@rover:/home/asbesto/Desktop/src# d=apulse && cd /tmp && git clone git://github.com/i-rinat/$d.git && cd $d && F="-m32 -march=
native -msse3 -O3 -fomit-frame-pointer -pipe -DNDEBUG" && PKG_CONFIG_PATH=/usr/lib/pkgconfig cmake -LA -DCMAKE_C_FLAGS_RELEASE="$F
" -DCMAKE_CXX_FLAGS_RELEASE="$F" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && make -j4
Cloning into 'apulse'...
remote: Enumerating objects: 893, done.
remote: Total 893 (delta 0), reused 0 (delta 0), pack-reused 893
Receiving objects: 100% (893/893), 336.15 KiB | 353.00 KiB/s, done.
Resolving deltas: 100% (622/622), done.
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Checking for modules 'glib-2.0;alsa'
--   Found glib-2.0, version 2.50.3
--   Found alsa, version 1.1.3
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/apulse
-- Cache values
APULSEPATH:PATH=/usr/lib/apulse
APULSE_SEARCH_PATHS:PATH=/usr/lib/apulse
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-m32 -march=native -msse3 -O3 -fomit-frame-pointer -pipe -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-m32 -march=native -msse3 -O3 -fomit-frame-pointer -pipe -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/usr
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
LOG_TO_STDERR:STRING=0
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
USE_BUNDLED_PULSEAUDIO_HEADERS:STRING=1
WITH_TRACE:STRING=0
Scanning dependencies of target trace-helper
[  4%] Building C object CMakeFiles/trace-helper.dir/src/trace.c.o
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /tmp/apulse/src/trace.h:27,
                 from /tmp/apulse/src/trace.c:25:
/usr/include/glib-2.0/glib/gtypes.h: In function ‘_GLIB_CHECKED_ADD_U64’:
/usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro ‘G_STATIC_ASSERT’
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^~~~~~~~~~~~~~~
CMakeFiles/trace-helper.dir/build.make:62: recipe for target 'CMakeFiles/trace-helper.dir/src/trace.c.o' failed
make[2]: *** [CMakeFiles/trace-helper.dir/src/trace.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/trace-helper.dir/all' failed
make[1]: *** [CMakeFiles/trace-helper.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
root@rover:/tmp/apulse#

Any help? :(

@i-rinat
Copy link
Owner

i-rinat commented Feb 17, 2019

Hi.
I have no installed copy of Devuan, but since it's kind of based on Debian, library triplets should be the same.

In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0

Here x86-64 version of GLib's configuration is included, which caused type mismatches. For 32-bit build, you need to make sure i386 version is included. I think, changing PKG_CONFIG_PATH=/usr/lib/pkgconfig to PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig in your build command should be enough.

@asbestomolesto
Copy link
Author

I just tried that and I obtain the same error:

asbesto@rover:~/Desktop/src/apulse-master/build$ PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 cmake -DCMAKE_INSTALL_PR
EFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Checking for modules 'glib-2.0;alsa'
--   Found glib-2.0, version 2.50.3
--   Found alsa, version 1.1.3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/asbesto/Desktop/src/apulse-master/build
asbesto@rover:~/Desktop/src/apulse-master/build$
asbesto@rover:~/Desktop/src/apulse-master/build$ make
Scanning dependencies of target trace-helper
[  4%] Building C object CMakeFiles/trace-helper.dir/src/trace.c.o
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /home/asbesto/Desktop/src/apulse-master/src/trace.h:27,
                 from /home/asbesto/Desktop/src/apulse-master/src/trace.c:25:
/usr/include/glib-2.0/glib/gtypes.h: In function ‘_GLIB_CHECKED_ADD_U64’:
/usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^~~~~~~
/usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro ‘G_STATIC_ASSERT’
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^~~~~~~~~~~~~~~
CMakeFiles/trace-helper.dir/build.make:62: recipe for target 'CMakeFiles/trace-helper.dir/src/trace.c.o' failed
make[2]: *** [CMakeFiles/trace-helper.dir/src/trace.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/trace-helper.dir/all' failed
make[1]: *** [CMakeFiles/trace-helper.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
asbesto@rover:~/Desktop/src/apulse-master/build$ 

:(

@i-rinat
Copy link
Owner

i-rinat commented Feb 18, 2019

Do you have packages libasound2-dev:i386, libglib2.0-dev:i386, gcc-multilib, g++-multilib installed?

@asbestomolesto
Copy link
Author

Yes I have them...

@asbestomolesto
Copy link
Author

Well my goal is to use it with gqrx-sdr. I managed to install a recent package from a more recent repository. but unfortunately gqrx-sdr segfault :(

@i-rinat
Copy link
Owner

i-rinat commented Feb 18, 2019

Yes I have them...

Then it should compile with the commands you posted here. At least they worked in the VM with Devuan. I just tried to install a new Devuan ASCII copy and successfully have built apulse there.

If that for some reason doesn't work, you may try to build in 32-bit chroot.

Well my goal is to use it with gqrx-sdr.

Doesn't it support ALSA? There is a portaudio backend, which should support ALSA directly.

@Centuriondan
Copy link

Devuan ships apulse already in Ascii.. (may be in Jessie too - but I never needed it there)

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

No branches or pull requests

3 participants