Compilation problems with OpenAL under win32 / mingw #134
Labels
No Label
RGSS accuracy
bug
compilation
discussion
documentation
duplicate
enhancement
invalid
performance issue
port request
question
ruby incompatibility
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MapleShrine/mkxp#134
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For example:
C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/socket.so: [BUG] Segmentation fault
I've tried different versions of ruby.
This only happens when I use your windows build, I can load gems with an old version I've compiled myself, any idea what might cause this?
Unfortunately I haven't been able to succesfully compile mkxp myself lately due to the compiler complaining about some missing OpenAL references..
I think both libruby and the gems must have originated from the same build, otherwise all bets are off. Since the version of ruby I used for the win build is very likely different from what you have installed on your system, it's bound to run into problems.
So if you want to use the latest mkxp source with gems, compiling yourself is probably the sanest choice. Maybe we should look at those OpenAL errors instead?
So it doesn't use the ruby dll in the same folder if present?
Yeah that might be better, I'll post them here in a few.
The win build has everything statically linked in, that's why you don't see any other dlls either (except fluidsynth). Besides, switching out dlls like that underneath the exe might bring problems of its own, especially with something as complex as MRI, which in 99% of cases isn't used as a shared lib anyway and thus likely doesn't have a strong focus on API stability.
Alright so I'm getting these errors during linking:
I've tried different versions of OpenAL, recompiling openAL, nothing worked for me.
This is on Ubuntu 14.04
Oh ok, so this is with mingw. Are you linking against OpenAL dynamically or statically?
Googling for the imp_ prefix, there are mentions that a faulty
declspec(dllimport)
declaration of functions in a header could be responsible for this.The link.txt generated by CMake contains this:
-Bstatic -lOpenAL32 -lz -Wl
So I assume it's trying to link OpenAL statically.
So there's your problem; the
dllimport
tells the compiler to look for_imp__
prefixed symbols because it thinks it's linking against a dll, but then you're telling the linker to do it statically, so they don't exist. Either link against the dll, or ensure that thedllimport
prefix is the OpenAL headers is not set.From looking at
al.h
, the first thing you could try is telling cmake to-DAL_LIBTYPE_STATIC
, which will drop the dllimport.Sorry for the late response.
I've tried compiling a fresh clone with passing that option to the cmake flags, but it still throws the same errors when linking.
I've done some googling as well and I can't seem to find a solution, I'm also not very experienced with this stuff in general so that doesn't really help..
Any other things I could try?
I will upload a working mingw-w64 depkit soonish that should render this issue void.