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

Build hidapi against latest mingw-w64 headers #5

Merged
merged 2 commits into from
Feb 13, 2017

Conversation

awson
Copy link

@awson awson commented Nov 9, 2016

Not guarded, perhaps breaks old headers build.

This is a complement to another PR, which together allow to build supercollider with the latest stock MSys2/mingw-w64 tools.

@bagong
Copy link

bagong commented Nov 9, 2016

Thank you very much for your continued contributions! Unfortunately I won't be able to test this before January myself. Hopefully somebody else can test this. If not please don't feel ignored. It's just that I won't be able to access my build-system for 2 months. Thanks again!

@llloret
Copy link
Member

llloret commented Nov 9, 2016 via email

@bagong
Copy link

bagong commented Jan 30, 2017

Hi @awson ,
thanks again for this! In fact this does create a linker problem for the old MinGW build, which is based on Qt-provided MinGW 4.8.2. Not sure if your changes could be introduced without this side effect?

 ../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x3a8): undefined reference to `HidD_GetPreparsedData'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x456): undefined reference to `HidD_GetSerialNumberString'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x578): undefined reference to `HidD_FreePreparsedData'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x767): undefined reference to `HidD_GetPreparsedData'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x7a6): undefined reference to `HidD_FreePreparsedData'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x848): undefined reference to `HidD_FreePreparsedData'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x1590): undefined reference to `HidD_GetSerialNumberString'
../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj):hid.c:(.text+0x1657): undefined reference to `HidD_GetIndexedString'
C:/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: ../external_libraries/hidapi/windows/libhidapi.a(hid.c.obj): bad reloc address 0x20 in section `.eh_frame'
collect2.exe: error: ld returned 1 exit status
lang\CMakeFiles\sclang.dir\build.make:140: recipe for target 'lang/Release/sclang.exe' failed
mingw32-make.exe[2]: *** [lang/Release/sclang.exe] Error 1
CMakeFiles\Makefile2:2739: recipe for target 'lang/CMakeFiles/sclang.dir/all' failed
mingw32-make.exe[1]: *** [lang/CMakeFiles/sclang.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2

@bagong
Copy link

bagong commented Feb 6, 2017

Hi @awson , I added a comment to your PR informing about the potential build problem. I did not find a way to switch header inclusion depending on MinGW version (__MINGW_VERSION_MAJOR didn't work for me). I think this should be merged as is. I will disable hidapi-build for MinGW builds with gcc < 5.3 by default in SuperCollider and explain what to do about it in the Readme. The old state was a hack anyways... Thanks!

@mossheim
Copy link

I think this is fine as-is with the readme note, although I'd just like to add that we may want to test the #ifdef method again with the macros __MINGW{32,64}_VERSION_MAJOR (https://sourceforge.net/p/predef/wiki/Compilers/)

@mossheim mossheim merged commit 7ec3943 into supercollider:master Feb 13, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants