FBX2glTF icon indicating copy to clipboard operation
FBX2glTF copied to clipboard

Can't build on MacOS 13

Open elalish opened this issue 2 years ago • 12 comments

Godot version

N/A

System information

M1 Macbook Pro, macOS 13.5

Issue description

I'm hoping to contribute to this project, so I'm starting by trying to get a local build working. Conan is not finding iconv even though it's provided by OSX. In searching, I see lots of people having vaguely related problems, but I have no idea how to even debug why Conan can't seem to find iconv, much less fix it.

I figured I'd ask in case someone has tried and knows the magic incantation.

Steps to reproduce

I followed the Github actions, so after cloning the repo and fetching the FBX SDK, I tried running:

pip install --upgrade conan==1.58
conan profile new default --detect
conan profile show default
env CMAKE_OSX_ARCHITECTURES=x86_64 conan install . -i build -s build_type=Release --settings arch=x86_64 --build missing

But at this point, I get an error about failing to find iconv:

Performing configuration checks

    - default address-model    : 64-bit [1]
    - default architecture     : x86 [1]
    - compiler supports SSE2   : yes [2]
    - compiler supports SSE4.1 : yes [2]
    - has std::atomic_ref      : no [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - has init_priority attribute : yes [2]
    - has stat::st_blksize     : no [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : yes [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : yes [2]
    - zlib                     : yes [3]
    - bzip2                    : yes [3]
    - iconv (libc)             : no [2]
    - iconv (separate)         : no [2]
- Boost.Locale failed to find iconv (separate) library to be built.
boost/1.78.0: 
boost/1.78.0: ERROR: Package 'c9b9cbf463efdfe91cd1b39fbd90e49b9d3ac02b' build failed
boost/1.78.0: WARN: Build folder /Users/elalish/.conan/data/boost/1.78.0/_/_/build/c9b9cbf463efdfe91cd1b39fbd90e49b9d3ac02b/build-release
ERROR: boost/1.78.0: Error in build() method, line 887
	self.run(full_command)
	ConanException: Error 1 while executing b2 -q target-os=darwin architecture=x86 address-model=64 binary-format=mach-o abi=sysv --layout=system --user-config=/Users/elalish/.conan/data/boost/1.78.0/_/_/source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libiconv threading=multi visibility=hidden link=static variant=release --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-filesystem --with-iostreams --with-locale --with-log --with-program_options --with-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=clang-darwin pch=on -sLIBBACKTRACE_PATH=/Users/elalish/.conan/data/libbacktrace/cci.20210118/_/_/package/6841fe8f0f22f6fa260da36a43a94ab525c7ed8d -sICONV_PATH=/Users/elalish/.conan/data/libiconv/1.15/_/_/package/6841fe8f0f22f6fa260da36a43a94ab525c7ed8d linkflags="-stdlib=libc++" cxxflags="-fPIC -stdlib=libc++ -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/Users/elalish/.conan/data/boost/1.78.0/_/_/package/c9b9cbf463efdfe91cd1b39fbd90e49b9d3ac02b -j10 --abbreviate-paths -d0 --debug-configuration --build-dir="/Users/elalish/.conan/data/boost/1.78.0/_/_/build/c9b9cbf463efdfe91cd1b39fbd90e49b9d3ac02b/build-release"

Minimal reproduction project

N/A

elalish avatar Aug 25 '23 17:08 elalish

I have no idea.

Is brew's iconv is visible in path.

fire avatar Aug 25 '23 18:08 fire

 ~ % which iconv
/usr/bin/iconv

fire avatar Aug 25 '23 19:08 fire

I don't have brew's iconv installed (though I tried it too, to no avail). I have the same which output as you, but that's not the library. Does it build for you on a Macbook, or have you tried?

elalish avatar Aug 25 '23 19:08 elalish

I've had a lot trouble. I was only able to build on the exact cicd setup.

fire avatar Aug 25 '23 19:08 fire

I suspect it's arm64 vs intel 64bit problem.

fire avatar Aug 25 '23 22:08 fire

@elalish Did you have any success?

I am also investigating https://github.com/ufbx/ufbx which is 100% opensource.

fire avatar Aug 31 '23 14:08 fire

I did not, but ufbx looks interesting. I was considering trying to update the three.js FBXLoader to avoid all this building business, but I'm not sure how that'll go.

elalish avatar Aug 31 '23 15:08 elalish

@elalish https://github.com/godotengine/godot/pull/81746 More integration work.

fire avatar Sep 17 '23 23:09 fire

@elalish The important parts of ufbx is feature complete. We're ignoring lights and cameras, but blend shape, skinned meshes and 3d transforms work and with animation too.

fire avatar Oct 08 '23 17:10 fire

Awesome, thanks for letting me know!

elalish avatar Oct 09 '23 15:10 elalish

We merged https://github.com/godotengine/godot/pull/81746 and that means we have a native FBX importer in Godot Engine.

fire avatar Feb 26 '24 15:02 fire

May have restored building on the mac. https://github.com/godotengine/FBX2glTF/pull/52

Testing using https://github.com/godotengine/FBX2glTF/pull/57

fire avatar Apr 28 '24 17:04 fire