hselasky / hpsjam

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

stdlib.h: No such file or directory ? #8

Closed gilgongo closed 3 years ago

gilgongo commented 3 years ago

Hi!

I'm using Ubuntu 18.04 on a machine that can compile Jamulus (I installed libfftw3-dev libqt5svg5-dev) and bbang! I got this:

In file included from /usr/include/c++/7/bits/stl_algo.h:59:0,
                 from /usr/include/c++/7/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:109,
                 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++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.
Makefile:575: recipe for target 'audiobuffer.o' failed
make: *** [audiobuffer.o] Error 1

I got the file though I think:

gilgongo@monospline:~/hpsjam$ locate stdlib.h
/snap/gimp/297/usr/include/stdlib.h
/snap/gimp/297/usr/include/c++/7/stdlib.h
/snap/gimp/297/usr/include/c++/7/tr1/stdlib.h
/snap/gimp/297/usr/include/x86_64-linux-gnu/bits/stdlib.h
/snap/gimp/322/usr/include/stdlib.h
/snap/gimp/322/usr/include/c++/7/stdlib.h
/snap/gimp/322/usr/include/c++/7/tr1/stdlib.h
/snap/gimp/322/usr/include/x86_64-linux-gnu/bits/stdlib.h
/snap/gnome-3-34-1804/36/usr/include/stdlib.h
/snap/gnome-3-34-1804/36/usr/include/c++/6/stdlib.h
/snap/gnome-3-34-1804/36/usr/include/c++/6/tr1/stdlib.h
/snap/gnome-3-34-1804/36/usr/include/freetype2/freetype/config/ftstdlib.h
/snap/gnome-3-34-1804/36/usr/include/x86_64-linux-gnu/bits/stdlib.h
/usr/include/stdlib.h
/usr/include/c++/7/stdlib.h
/usr/include/c++/7/tr1/stdlib.h
/usr/include/freetype2/freetype/config/ftstdlib.h
/usr/include/x86_64-linux-gnu/bits/stdlib.h
hselasky commented 3 years ago

What compiler are you using? Can you try compling this software using clang?

hselasky commented 3 years ago

Or g++ ?

hselasky commented 3 years ago

Can you also show all the commands you did, like qmake ... and "which qmake" ?

@dingodoppelt : Any ideas?

gilgongo commented 3 years ago

I just followed the commands in your readme:

qmake PREFIX=/usr make all make install

The versions of qmake etc. will be the ones you get with Ubuntu 18.04 I would think. gcc I would think for the compiler too. What's clang?

hselasky commented 3 years ago

I haven't yet test built on Ubuntu, only Linux Mint, which should be equivalent.

hselasky commented 3 years ago

See: https://stackoverflow.com/questions/52532936/usr-include-c-7-cstdlib7515-fatal-error-stdlib-h-no-such-file-or-directo

Can you try adding: QMAKE_CFLAGS_ISYSTEM = -I

to HpsJam.pro ? Then re-run qmake and make?

gilgongo commented 3 years ago

My setup might have some abnormality perhaps. The only thing I can think of though is that I have the Ubuntu realtime kernel installed (silly I know, but I'm quite young and inexperienced).

hselasky commented 3 years ago

If you Google those error messages, you'll find the solution. You're not the first one to hit this problem and it doesn't appear to be specific to HpsJam ...

gilgongo commented 3 years ago

Can you try adding: QMAKE_CFLAGS_ISYSTEM = -I

OK that worked. Running now, thanks!