oF compilation fail (openCv addon/ofOpenALSoundPlayer)

hello! so i want to install oF on arch linux (manjaro) but when i try to install the dependencies i get

Updating ofxOpenCV to use openCV4
sed: can't read /addons/ofxOpenCv/addon_config.mk: No such file or directory
sed: can't read /addons/ofxOpenCv/addon_config.mk: No such file or directory

and when i try to compile oF i get this error:


In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:17:
/usr/include/AL/alc.h:34:16: error: using typedef-name 'ALCdevice' after 'struct'
   34 | typedef struct ALCdevice ALCdevice;
      |                ^~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
/home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:13:33: note: 'ALCdevice' has a previous declaration here
   13 | typedef struct ALCdevice_struct ALCdevice;
      |                                 ^~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:17:
/usr/include/AL/alc.h:34:26: error: conflicting declaration 'typedef int ALCdevice'
   34 | typedef struct ALCdevice ALCdevice;
      |                          ^~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
/home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:13:33: note: previous declaration as 'typedef struct ALCdevice_struct ALCdevice'
   13 | typedef struct ALCdevice_struct ALCdevice;
      |                                 ^~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:17:
/usr/include/AL/alc.h:36:16: error: using typedef-name 'ALCcontext' after 'struct'
   36 | typedef struct ALCcontext ALCcontext;
      |                ^~~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
/home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:15:34: note: 'ALCcontext' has a previous declaration here
   15 | typedef struct ALCcontext_struct ALCcontext;
      |                                  ^~~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:17:
/usr/include/AL/alc.h:36:27: error: conflicting declaration 'typedef int ALCcontext'
   36 | typedef struct ALCcontext ALCcontext;
      |                           ^~~~~~~~~~
In file included from /home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
/home/alex/of/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:15:34: note: previous declaration as 'typedef struct ALCcontext_struct ALCcontext'
   15 | typedef struct ALCcontext_struct ALCcontext;
      |                                  ^~~~~~~~~~
make[1]: *** [makefileCommon/compile.core.mk:240: /home/alex/of/libs/openFrameworksCompiled/lib/linux64/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o] Error 1
make: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
there has been a problem compiling Debug OF library
please report this problem in the forums

I dont know if the two are related but i think so. Everything i tried so far didnt work so i would really appreciate it if someone has any idea what i could do to fix this

change this lines

typedef struct ALCdevice_struct ALCdevice;
typedef struct ALCcontext_struct ALCcontext;



to :

/** Opaque device handle */
struct  ALCdevice;
/** Opaque context handle */
struct ALCcontext;

the other error i got it to but it doesnt affect me on anything so
good luck

1 Like

worked great! thank you!

Also getting these errors on Manjaro. For the first one you describe, with addon_config.mk, removing $ROOT/ from line 22 in install_dependencies.sh seems to solve it, or at least there’s no error. I don’t know what the variable is for. Doesn’t even seem to be defined.

@cyrstem’s solution seems to work for me too, but I’m curious what it does.

the issue is with new vs of OpenAL on your system the issue is discuss
here

1 Like