openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

Fatal error when compiling OpenFrameworks msys2 windows

Open jumeca opened this issue 4 years ago • 10 comments

Hello all, I'm trying to compile openframeworks after correctly installing the dependencies and I'm getting the following error:

jumer@LAPTOP-5L6ENGGB MINGW32 /c/Users/jumer/openFrameworks-msys2/libs/openFrameworksCompiled/project $ make Compiling /c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/app/ofAppRunner.cpp /mingw32/bin/g++ -g3 -DDEBUG -std=gnu++14 -DUNICODE -D_UNICODE -Wall -fexceptions -march=native -mtune=native -mms-bitfields -IC:/msys64/mingw32/include/cairo -IC:/msys64/mingw32/include/lzo -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/freetype2 -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/libpng16 -IC:/msys64/mingw32/include/harfbuzz -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/glib-2.0 -IC:/msys64/mingw32/lib/glib-2.0/include -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/pixman-1 -IC:/msys64/mingw32/include -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm/detail -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm/ext -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm/gtc -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm/gtx -I/c/Users/jumer/openFrameworks-msys2/libs/glm/include/glm/simd -I/c/Users/jumer/openFrameworks-msys2/libs/json/include -I/c/Users/jumer/openFrameworks-msys2/libs/kiss/include -I/c/Users/jumer/openFrameworks-msys2/libs/pugixml/include -I/c/Users/jumer/openFrameworks-msys2/libs/rtAudio/include -I/c/Users/jumer/openFrameworks-msys2/libs/tess2/include -I/c/Users/jumer/openFrameworks-msys2/libs/uriparser/include -I/c/Users/jumer/openFrameworks-msys2/libs/uriparser/include/uriparser -I/c/Users/jumer/openFrameworks-msys2/libs/utf8/include -I/c/Users/jumer/openFrameworks-msys2/libs/utf8/include/utf8 -I/c/Users/jumer/openFrameworks-msys2/libs/videoInput/include -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/3d -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/app -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/communication -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/events -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/gl -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/graphics -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/math -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/sound -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/types -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/utils -I/c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/video -MMD -MP -MF /c/Users/jumer/openFrameworks-msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/app/ofAppRunner.d -MT/c/Users/jumer/openFrameworks-msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/app/ofAppRunner.o -o /c/Users/jumer/openFrameworks-msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/app/ofAppRunner.o -c /c/Users/jumer/openFrameworks-msys2/libs/openFrameworks/app/ofAppRunner.cpp In file included from C:/Users/jumer/openFrameworks-msys2/libs/openFrameworks/sound/ofSoundPlayer.h:36, from C:/Users/jumer/openFrameworks-msys2/libs/openFrameworks/app/ofAppRunner.cpp:7: C:/Users/jumer/openFrameworks-msys2/libs/openFrameworks/sound/ofFmodSoundPlayer.h:11:10: fatal error: fmod.h: No such file or directory 11 | #include "fmod.h" | ^~~~~~~~ compilation terminated. make[2]: *** [makefileCommon/compile.core.mk:240: /c/Users/jumer/openFrameworks-msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/app/ofAppRunner.o] Error 1 make[1]: *** [makefileCommon/compile.core.mk:212: Debug] Error 2 make: *** [makefileCommon/compile.core.mk:228: all] Error 2

I am using of_v0.11.0_msys264_release

Any idea about the solution? Thanks

jumeca avatar Oct 19 '20 19:10 jumeca

Did you download the 3rd party libs with $OF_ROOT/scripts/msys2/download_libs.sh ? Fmod is only used for MINGW32. Did you try to use it with MINGW64 ? (If you switch from MINGW32 to MINGW64, you'll have to download 3rd party libs on every switch)

oxillo avatar Dec 16 '20 18:12 oxillo

@oxillo - is there a reason for no fmod on mingw64? do you think with the newer libs we just updated it could work now to use the 64bit ones we use for VS?

ofTheo avatar Jan 15 '21 23:01 ofTheo

@ofTheo - several resons :

  • #167 (an old one) discussing replacement of fmod.
  • non availability / no access to MSYS2 64bit lib. VS libs may work.
  • licensing issues - I would personally prefer fmod as an ofxaddon

I've left MINGW32 with fmod to avoid breaking changes for MINGW32 users. But there were no MINGW64 users, so I've decided to go for OpenAL. I think that for next version, we should have a consistency MINGW32<->MINGW64. It can be OpenAL or Fmod.

oxillo avatar Jan 18 '21 22:01 oxillo

@oxillo thanks for this. I do agree that we should probably do the same for both versions.

I also wonder how long we should keep 32bit versions of VS and MSYS2 around for?

I am not sure personally which way we should go for mingw64 in terms of fmod vs openal.

The msys2 fmod libs here: http://ci.openframeworks.cc/libs/fmod/ Are just the 32bit VS ones - so I could try and get apothecary to include the 64bit ones too?

If the OpenAL functionality feels pretty good for msys2 we could try that for both? I do think eventually moving fmod to an addon makes sense.

Once I have some time I would like to try brining the AVFoundation SoundPlayer closer to fmod parity.

ofTheo avatar Jan 19 '21 21:01 ofTheo

What we could do for msys is what we do in linux, have openAL as default and fmod as optional through a macro by now and as an addon once we do the same for other platforms.

re 32buts, i would keep it by now but remove it for next major version while keeping the ability to build libraries in 32 bits from apothecary

arturoc avatar Jan 21 '21 10:01 arturoc

cool - that sounds good @arturoc ! I can work on getting apothecary doing fmod for 64bit.

@oxillo would you be able to try making OpenAL default for both mysy2 versions?

ofTheo avatar Jan 21 '21 17:01 ofTheo

@ofTheo I'll do it - I think over the weekend

oxillo avatar Jan 21 '21 18:01 oxillo

Hello, I am not sure if helps...but I am getting this error when compiling on Windows 10 / MINGW64. patch-release branch..


MINGW64 /openFrameworks/libs/openFrameworksCompiled/project
$ make

...
...
/mingw64/bin/g++ -g3  -DDEBUG -std=gnu++14 -DUNICODE -D_UNICODE -Wall -fexceptions -DOF_USING_MPG123 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/lzo -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -mms-bitfields -IC:/msys64/mingw64/include/pixman-1 -IC:/msys64/mingw64/include/AL -IC:/msys64/mingw64/include/opus -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/fmod/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/fmodex/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm/detail -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm/ext -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm/gtc -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm/gtx -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/glm/include/glm/simd -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/json/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/kiss/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/libusb/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/pugixml/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/rtAudio/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/tess2/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/uriparser/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/uriparser/include/uriparser -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/utf8/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/utf8/include/utf8 -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/videoInput/include -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/3d -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/app -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/communication -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/events -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/gl -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/graphics -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/math -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/sound -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/types -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/utils -I/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/video  -MMD -MP -MF /c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.d -MT/c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o -o /c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o -c /c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp
In file included from C:/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:10:
C:/msys64/mingw64/include/sndfile.h:356:33: error: conflicting declaration 'typedef struct sf_private_tag SNDFILE'
  356 | typedef struct sf_private_tag   SNDFILE ;
      |                                 ^~~~~~~
In file included from C:/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/sound/ofOpenALSoundPlayer.cpp:1:
C:/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworks/sound/ofOpenALSoundPlayer.h:18:33: note: previous declaration as 'typedef struct SNDFILE_tag SNDFILE'
   18 | typedef struct SNDFILE_tag      SNDFILE ;
      |                                 ^~~~~~~
make[2]: *** [makefileCommon/compile.core.mk:240: /c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/sound/ofOpenALSoundPlayer.o] Error 1
make[1]: *** [makefileCommon/compile.core.mk:212: Debug] Error 2
make: *** [makefileCommon/compile.core.mk:228: all] Error 2

moebiussurfing@surfingMachine MINGW64 /c/Users/moebi/OneDrive/Documents/openFrameworks/libs/openFrameworksCompiled/project

moebiussurfing avatar Jun 06 '22 23:06 moebiussurfing

@moebiussurfing Hmm I think this is unrelated to the issue above - but I believe it is fixed in the nightly builds via this PR: #6932

Could you try the nightly msys2 build from the bottom of this page? https://openframeworks.cc/download/

ofTheo avatar Jun 07 '22 01:06 ofTheo

@moebiussurfing Hmm I think this is unrelated to the issue above - but I believe it is fixed in the nightly builds via this PR: #6932

Could you try the nightly msys2 build from the bottom of this page? https://openframeworks.cc/download/

thanks. it worked.

moebiussurfing avatar Jun 07 '22 02:06 moebiussurfing