i-rinat / apulse

PulseAudio emulation for ALSA
MIT License
609 stars 35 forks source link

apulse no longer be build on openSUSE Tumbleweed (glib-2.48 and alsa-1.1.1) #37

Closed 13ilya closed 8 years ago

13ilya commented 8 years ago

After the next update openSUSE Tumbleweed apulse no longer be build. (glib-2.48 and alsa-1.1.1)

sudo zypper in gcc-32bit gcc-c++-32bit glib2-devel-32bit alsa-devel-32bit

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" && cmake -LA -DCMAKE_C_FLAGS_RELEASE="$F" -DCMAKE_CXX_FLAGS_RELEASE="$F" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && make -j4 && sudo make install && cd .. && rm -rf $d

Клонирование в «apulse»…
remote: Counting objects: 385, done.
remote: Total 385 (delta 0), reused 0 (delta 0), pack-reused 385
Получение объектов: 100% (385/385), 187.25 KiB | 0 bytes/s, готово.
Определение изменений: 100% (244/244), готово.
Проверка соединения… готово.
-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 5.3.1
-- 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.1") 
-- Checking for modules 'glib-2.0;alsa'
--   Found glib-2.0, version 2.48.0
--   Found alsa, version 1.1.1
-- 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/gmake
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
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
USE_BUNDLED_PULSEAUDIO_HEADERS:STRING=1
WITH_TRACE:STRING=0
Scanning dependencies of target trace-helper
[  5%] Building C object CMakeFiles/trace-helper.dir/src/trace.c.o
In file included from /usr/lib64/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:28,
                 from /tmp/apulse/src/trace.c:30:
/usr/include/glib-2.0/glib/gtypes.h: В функции «_GLIB_CHECKED_ADD_U64»:
/usr/include/glib-2.0/glib/gmacros.h:217:53: ошибка: size of array «_GStaticAssertCompileTimeAssertion_0» is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr)
                                                     ^
/usr/include/glib-2.0/glib/gmacros.h:214:47: замечание: in definition of macro «G_PASTE_ARGS»
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^
/usr/include/glib-2.0/glib/gmacros.h:217:44: замечание: in expansion of macro «G_PASTE»
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr)
                                            ^
/usr/include/glib-2.0/glib/gtypes.h:422:3: замечание: in expansion of macro «G_STATIC_ASSERT»
   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
   ^
CMakeFiles/trace-helper.dir/build.make:62: ошибка выполнения рецепта для цели «CMakeFiles/trace-helper.dir/src/trace.c.o»
make[2]: *** [CMakeFiles/trace-helper.dir/src/trace.c.o] Ошибка 1
CMakeFiles/Makefile2:67: ошибка выполнения рецепта для цели «CMakeFiles/trace-helper.dir/all»
make[1]: *** [CMakeFiles/trace-helper.dir/all] Ошибка 2
Makefile:127: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2
i-rinat commented 8 years ago

Hi.

I've checked now, and I have the same error on Debian testing. That's not due to alsa-lib update, but because of GLib. In 64-bit version GLib headers define guint64 as unsigned long, which is 64-bit unsigned. But in 32-bit mode unsigned long is 32-bit. Still compiling in 32-bit mode uses headers designed for 64-bit installations. Compilation-time assertion just makes error clear.

i-rinat commented 8 years ago

Try setting PKG_CONFIG_PATH=/usr/lib/pkgconfig before calling cmake. That will make pkg-config to look into /usr/lib/pkgconfig before /usr/lib64/pkgconfig and it will catch flags from glib-devel-32bit rather than from glib-devel.

13ilya commented 8 years ago

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 && sudo make install && cd .. && rm -rf $d

Thank you, its work. :-)

i-rinat commented 8 years ago

I can't see how it could be fixed in apulse, since it's caused by external library, GLib.