hselasky / hpsjam

Online audio jamming software
BSD 2-Clause "Simplified" License
36 stars 5 forks source link

requesting kind assitance with a compile err #11

Closed iFriendGit closed 2 years ago

iFriendGit commented 2 years ago

Hello HPS! I'm trying to install the fine HPS prog on a new ubuntu 20.04 server and get this as err. I know it looks like a "generic" issue, but even after researching for a long time I was unable to find a solution, so maybe you know smth abt it? The stdlib.h is definitely present at /usr/include...

Do you have any idea, please?

Thanks again for your fine program!

------------ THE ERROR ------------ make all g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DHAVE_HTTPD -DHAVE_JACK_AUDIO -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o audiobuffer.o src/audiobuffer.cpp In file included from /usr/include/c++/9/bits/stl_algo.h:59, from /usr/include/c++/9/algorithm:62, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:142, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:43, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:48, from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:46, from /usr/include/x86_64-linux-gnu/qt5/QtCore/QObject:1, from src/protocol.h:29, from src/audiobuffer.h:33, from src/audiobuffer.cpp:26: /usr/include/c++/9/cstdlib:75:15: fatal error: stdlib.h: No such file or directory 75 | #include_next | ^~~~~~ compilation terminated. make: *** [Makefile:568: audiobuffer.o] Error 1

hselasky commented 2 years ago

I think if you compile using clang it will work. Just override CXX=which clang++ in the environment before qmake.

iFriendGit commented 2 years ago

Thank you very much HP! I'm not experienced at all with this c++ stuff, so here is what I did (and failed)

I installed clang: sudo apt install clang-12

I issued "which clang++", which returned nothing Then I searched any clang stuff myself: ls /usr/bin/clang* , which returned: /usr/bin/clang++-12 /usr/bin/clang-12 /usr/bin/clang-cpp-12

So I issued export CXX=/usr/bin/clang++-12 qmake PREFIX=/usr make all

And got exactly the same error.

Any suggestions? Or am I on the wrong path anyway?

Note: I did the same as above using "sudo apt install clang". And the "which clang++" returned the path. But still the same error after export, etc. And "echo $CXX" correctly returns "/usr/bin/clang++"

hselasky commented 2 years ago

Can you put this in the *.pro file:

QMAKE_CC = clang-12
QMAKE_CXX = clang++-12

Then run qmake again. Then make.

--HPS

iFriendGit commented 2 years ago

thanks again, HP! I did as you suggested with both, clang-12 and clang Still no luck, same err... The strange thing is that the file it complains about as missing is definitely there.

hselasky commented 2 years ago

Can you show all messages printed after the change above?

hselasky commented 2 years ago

After searching a bit I found this (your issue is a well known issue): qmake 'QMAKE_CFLAGS_ISYSTEM=-I'

iFriendGit commented 2 years ago

that worked, thank you so much!

Still, now I find the next issue: g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DHAVE_HTTPD -DHAVE_JACK_AUDIO -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I /usr/include -I /usr/include/x86_64-linux-gnu/qt5 -I /usr/include/x86_64-linux-gnu/qt5/QtSvg -I /usr/include/x86_64-linux-gnu/qt5/QtWidgets -I /usr/include/x86_64-linux-gnu/qt5/QtGui -I /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o sound_jack.o linux/sound_jack.cpp linux/sound_jack.cpp:31:10: fatal error: jack/jack.h: No such file or directory 31 | #include <jack/jack.h> | ^~~~~ compilation terminated. make: *** [Makefile:778: sound_jack.o] Error 1


jackd is installed from ubuntu repo...

I see this: locate jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-40/include/linux/extcon/extcon-adc-jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-40/include/sound/jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-40/include/sound/soc-jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-41/include/linux/extcon/extcon-adc-jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-41/include/sound/jack.h /usr/src/linux-hwe-5.13-headers-5.13.0-41/include/sound/soc-jack.h

On a different note, I researched the first issue for quite some hours and did not find your solution.

iFriendGit commented 2 years ago

fyi, dear HP, I decided to reinstall the full server, hoping that things could get solved. Hoping to save you some time.

iFriendGit commented 2 years ago

Maybe interesting for you, HP:

1) installed a fresh ubuntu 20.4 2) installed the usual packages (qt, etc) 3) issued qmake qmake PREFIX=/us (NOTE THAT it is wrongly written, missing the "r") 4) it compiled without the missing stdlib.h error, but had the jack error

I then noticed the error from (3) and re-tried with the full "usr". Then it failed already at the stdlib.h err!!! Strange?

Anyhow, I'm thinking of giving up now as this is too time consuming. Maybe if you have another hint I can try again, but I don't get even the problem so I'm outa ideas.

My final status is the err: g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DHAVE_HTTPD -DHAVE_JACK_AUDIO -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I /usr/include -I /usr/include/x86_64-linux-gnu/qt5 -I /usr/include/x86_64-linux-gnu/qt5/QtSvg -I /usr/include/x86_64-linux-gnu/qt5/QtWidgets -I /usr/include/x86_64-linux-gnu/qt5/QtGui -I /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o sound_jack.o linux/sound_jack.cpp linux/sound_jack.cpp:31:10: fatal error: jack/jack.h: No such file or directory 31 | #include <jack/jack.h> | ^~~~~

hselasky commented 2 years ago

You are lacking the jack header files. I think that is installed by jack-dev .

hselasky commented 2 years ago

By giving this flag:

qmake WITHOUT_AUDIO=YES

You can skip the jack dependency for the server side.

iFriendGit commented 2 years ago

thank you very much, HP, that did the trick! Everything running now and could connect already. Having some strange issue now in that I only hear one side of my sound, whereas in all other soft it works. Tried the different in/outs and the mixer to no avail. Anyway, big thanks again for the kind help so far!!! The client im using is on Win btw and changing the ins and outs has no effect whatsoever it seems. I use my usual ASIO driver.

Edit: I now noticed that the client always starts with an err msg saying that cannot connect to ASIO or i have not 48k or i have not 96 buffer size. I have ASIO and 48k. So I set the buffer size in HPS client config to my actual 32 but the err msg at the start says the same. Also i noticed that whatever I set in the config regarding ins and outs gets lost on restart, to its original values, which makes me suspect that even the changes i make when trying to get rid of the "one side only" audio do not even get applied.

hselasky commented 2 years ago

Can you check that you have L-OUT 1 and R-OUT 2 in the config page?

hselasky commented 2 years ago

I think you found a bug in the Windows client: https://github.com/hselasky/hpsjam/commit/6c7aa0bd65f2f8551bbb52683b923f4668aeaa81

hselasky commented 2 years ago

I just updated the Windows binary .zip file. Try to re-fetch that, and if not already set, select L-OUT 1 R-OUT 2 and L-IN 1 and R-IN 2

hselasky commented 2 years ago

http://home.selasky.org/privat/hpsjam-binary-win64.zip

iFriendGit commented 2 years ago

thank you very much, that fixed it! Happy to have found a bug :) Again, thanks for your excellent soft and also for your very kind assistance! Have a very nice day, HP!

hselasky commented 2 years ago

Thank you. Closing for now :-)

iFriendGit commented 2 years ago

In an attempt to give a bit back, I compiled my experiences into a "HowTo" document for the Linux side of things from my perspective. Would you like me to provide it? If so, please indicate how.

hselasky commented 2 years ago

You may send a pull request to update the README.md if you like.