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

fails to build in mixed mode #21

Closed
falkTX opened this issue Oct 27, 2012 · 9 comments
Closed

fails to build in mixed mode #21

falkTX opened this issue Oct 27, 2012 · 9 comments

Comments

@falkTX
Copy link
Member

falkTX commented Oct 27, 2012

latest git fals to build with --mixed.

final stage of build log:
[ 19/306] c: common/shm.c -> build/common/shm.c.1.o
18:13:49 runner ['/usr/bin/gcc', '-fPIC', '-fvisibility=hidden', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/linux', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/linux', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/posix', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/posix', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/common', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/common', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/common/jack', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/common/jack', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build', '-I/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a', '-DHAVE_CONFIG_H', '-DSERVER_SIDE', '../common/shm.c', '-c', '-o', 'common/shm.c.1.o']
../common/shm.c: In function ‘jack_resize_shm’:
../common/shm.c:670:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../common/shm.c: In function ‘jack_access_registry’:
../common/shm.c:1170:9: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c:1178:22: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c: In function ‘jack_create_registry’:
../common/shm.c:1202:9: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c:1210:22: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c: In function ‘jack_release_shm’:
../common/shm.c:1229:8: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c:1230:12: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c: In function ‘jack_shmalloc’:
../common/shm.c:1264:6: error: ‘jack_shm_info_t’ has no member named ‘attached_at’
../common/shm.c: In function ‘jack_attach_shm’:
../common/shm.c:1280:9: error: ‘jack_shm_info_t’ has no member named ‘attached_at’

@falkTX
Copy link
Member Author

falkTX commented Oct 27, 2012

I fixed it manually in the mean time, but the build still fails later on.
It was a bit hacky, has I just wanted to get jack2 to build.
My changes - http://kxstudio.sourceforge.net/Paste/repo/LAUJb

so now it fails with:
[177/306] cxxprogram: build/common/Jackdmp.cpp.1.o build/dbus/reserve.c.1.o build/dbus/audio_reserve.c.1.o -> build/linux/jackd
18:51:38 runner ['/usr/bin/g++', 'common/Jackdmp.cpp.1.o', 'dbus/reserve.c.1.o', 'dbus/audio_reserve.c.1.o', '-o', '/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/linux/jackd', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Lcommon', '-ljackserver', '-lpthread', '-lcelt0', '-lrt', '-ldl', '-lm', '-lstdc++', '-ldbus-1', '-lpthread', '-lrt']
common/libjackserver.so: undefined reference to `jack_attach_shm_read'

@sletz
Copy link
Member

sletz commented Oct 27, 2012

It seems that you'e compiling with old shared memory model, and it seems the code was not updated recently. I guess jack_attach_shm_read has to be defined as a copy of jack_attach_shm with SHM_RDONLY like:

int
jack_attach_shm_read (jack_shm_info_t* si)
{
if ((si->ptr.attached_at = shmat (jack_shm_registry[si->index].id, 0, SHM_RDONLY)) < 0) {
jack_error ("Cannot attach shm segment (%s)",
strerror (errno));
jack_release_shm_info (si->index);
return -1;
}
return 0;
}

Stéphane

Le 27 oct. 2012 à 19:57, falkTX a écrit :

I fixed it manually in the mean time, but the build still fails later on.
It was a bit hacky, has I just wanted to get jack2 to build.
My changes - http://kxstudio.sourceforge.net/Paste/repo/LAUJb

so now it fails with:
[177/306] cxxprogram: build/common/Jackdmp.cpp.1.o build/dbus/reserve.c.1.o build/dbus/audio_reserve.c.1.o -> build/linux/jackd
18:51:38 runner ['/usr/bin/g++', 'common/Jackdmp.cpp.1.o', 'dbus/reserve.c.1.o', 'dbus/audio_reserve.c.1.o', '-o', '/home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build/linux/jackd', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Lcommon', '-ljackserver', '-lpthread', '-lcelt0', '-lrt', '-ldl', '-lm', '-lstdc++', '-ldbus-1', '-lpthread', '-lrt']
common/libjackserver.so: undefined reference to `jack_attach_shm_read'


Reply to this email directly or view it on GitHub.

@falkTX
Copy link
Member Author

falkTX commented Oct 27, 2012

thanks, I've got jack2 to build now.
but it doesn't want to start;

$ jackd -d dummy
jackdmp 1.9.9.4
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot create shm segment /jack_shared0 (Invalid argument)
Cannot create shared memory segment of size = 82274202
JackShmMem::new bad alloc
jackctl_server_open error...
Failed to open server

@sletz
Copy link
Member

sletz commented Oct 27, 2012

Why are you using old System V shared memory model (and not POSIX one) ?

Stéphane

Le 27 oct. 2012 à 23:55, falkTX a écrit :

thanks, I've got jack2 to build now.
but it doesn't want to start;

$ jackd -d dummy
jackdmp 1.9.9.4
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
Cannot create shm segment /jack_shared0 (Invalid argument)
Cannot create shared memory segment of size = 82274202
JackShmMem::new bad alloc
jackctl_server_open error...
Failed to open server


Reply to this email directly or view it on GitHub.

@falkTX
Copy link
Member Author

falkTX commented Oct 27, 2012

Don't ask me, I'm just trying to build and use jack2.
Previous versions (1.9.8) worked just fine.
Is there a special dependency or ./waf configure flag I need for this?

@falkTX
Copy link
Member Author

falkTX commented Oct 27, 2012

in case you need specs, this is Ubuntu 12.04 64bit (~6 month old distro).
GCC at v4.6

@sletz
Copy link
Member

sletz commented Oct 27, 2012

The normal ./waf is supposed to using the POSIX shared memory model.

  1. Can you log what ./waf configure says?

  2. Hopefully someone of the jack-dev list can help

Stéphane

Le 28 oct. 2012 à 00:08, falkTX a écrit :

Don't ask me, I'm just trying to build and use jack2.
Previous versions (1.9.8) worked just fine.
Is there a special dependency or ./waf configure flag I need for this?


Reply to this email directly or view it on GitHub.

@falkTX
Copy link
Member Author

falkTX commented Oct 27, 2012

waf output:

./waf configure --prefix=/usr --classic --libdir=/usr/lib/x86_64-linux-gnu --clients=256 --ports-per-application=2048 --alsa --dbus --firewire --mixed --libdir32=/usr/lib/i386-linux-gnu
Setting top to : /home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a
Setting out to : /home/falktx/Personal/FOSS/KXStudio/PPA/Main/LADI-jack2-486f16a/build
Checking for 'g++' (c++ compiler) : /usr/bin/g++
Checking for 'gcc' (c compiler) : /usr/bin/gcc
Linux detected
Checking for header samplerate.h : yes
Checking for program pkg-config : /usr/bin/pkg-config
Checking for 'alsa' >= 1.0.18 : yes
Checking for 'libfreebob' >= 1.0.0 : not found
Checking for 'libffado' >= 1.999.17 : yes
Checking for 'dbus-1' >= 1.0.0 : yes
Checking for 'dbus-1' : yes
Checking for header expat.h : yes
Checking for header samplerate.h : yes
Checking for header sndfile.h : yes
Checking for 'celt' >= 0.5.0 : yes
Checking for library readline : yes
Checking for 'celt' >= 0.11.0 : yes
Checking for 'opus' >= 0.9.0 : not found
Install prefix : /usr
Library directory : /usr/lib/i386-linux-gnu
Drivers directory : /usr/lib/x86_64-linux-gnu/jack
Build debuggable binaries : no
C compiler flags : ['-Wall']
C++ compiler flags : ['-Wall']
Linker flags : []
Build doxygen documentation : no
Build Opus netjack2 : no
Build with engine profiling : no
Build with 32/64 bits mixed mode : yes
Build standard JACK (jackd) : yes
Build D-Bus JACK (jackdbus) : yes
Build with ALSA support : yes
Build with FireWire (FreeBob) support : no
Build with FireWire (FFADO) support : yes
D-Bus service install directory : /usr/share/dbus-1/services
'configure' finished successfully (0.592s)

adiknoth added a commit that referenced this issue Oct 28, 2012
conf.write_config_header() defaults to remove=True, so conf.defines() is
empty afterwards. Consequently, config.h is empty, too.

Set remove to False, so calling it another time for 32_64 builds works.

Closes: #21
@adiknoth
Copy link
Member

Guys, please read the commit log above. It explains everything.

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