godotengine / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
338 stars 89 forks source link

Can't build on MacOS 13 #47

Open elalish opened 1 year ago

elalish commented 1 year ago

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

fire commented 1 year ago

I have no idea.

Is brew's iconv is visible in path.

fire commented 1 year ago
 ~ % which iconv
/usr/bin/iconv
elalish commented 1 year ago

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?

fire commented 1 year ago

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

fire commented 1 year ago

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

fire commented 1 year ago

@elalish Did you have any success?

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

elalish commented 1 year ago

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.

fire commented 1 year ago

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

fire commented 12 months ago

@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.

elalish commented 11 months ago

Awesome, thanks for letting me know!

fire commented 7 months ago

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

fire commented 5 months ago

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

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