libgdx / fbx-conv

Command line utility using the FBX SDK to convert FBX/Collada/Obj files to a custom text/binary format for static, keyframed and skinned meshes.
Apache License 2.0
448 stars 116 forks source link

Unable to build fbx-conv on Linux (x86_64) #50

Closed mefesto closed 10 years ago

mefesto commented 10 years ago

I tried to locate the prebuilt binaries for linux but could only find what seemed to be for Mac OSX. So I tried to build the project myself on Linux (LinuxMint 16 x86_64) but received the following error:

Linking fbx-conv
../../../../Applications/fbx-sdk/lib/gcc4/x64/debug/libfbxsdk.so: undefined reference to `dlopen'
../../../../Applications/fbx-sdk/lib/gcc4/x64/debug/libfbxsdk.so: undefined reference to `dlclose'
../../../../Applications/fbx-sdk/lib/gcc4/x64/debug/libfbxsdk.so: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status

After searching around, I found this post on stackoverflow which suggests it's gcc's fault.

I edited the build/gmake/fbx-conv.make file and appended the flag -Wl,--no-as-needed flag to the LDFLAGS variable which allowed me to complete the build. The problem is the resulting executable segfaults.

mike-petersen commented 10 years ago

I did not need the options in order to compile. But it is also segfaulting on my machine.

In gdb i got the following error: (gdb) run Starting program: /home/mike/workspace/libgdx/fbx-conv/fbx-conv-git/fbx-conv [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault. 0x0000000000407c6e in fbxconv::log::Log::msg (this=0x7fffffffd9c0, code=2) at ../../src/log/log.h:58 58 return (*messages)[code];

I am running on Kubuntu 14.04. gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Linux mike-MS-7816 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

nooone commented 10 years ago

As a temporary solution, you can find an older version of fbx-conv here: https://dl.dropboxusercontent.com/u/1705466/gdx/fbx-conv.zip

It still includes a lin64 version.

xoppa commented 10 years ago

The segfault should be fixed for now by disabling optimization, see https://github.com/libgdx/fbx-conv/commit/0e6bcb3ec204a0eafd984bb83852183572f01255

mefesto commented 10 years ago

I pulled the latest (commit b60cba) and seems to be working. Thanks!