intel mac busted again.
just pulled dev branch and blows up again.
Maybe should put in a github workflow to build off the makefile ?
anyways here goes:
➜ bloeys__nmage git:(main) ✗ make
rm -rf nmage
rm -rf assimp-go
git clone https://github.com/bloeys/nmage -b dev
Cloning into 'nmage'...
remote: Enumerating objects: 222, done.
remote: Counting objects: 100% (222/222), done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 222 (delta 86), reused 183 (delta 53), pack-reused 0
Receiving objects: 100% (222/222), 48.58 KiB | 1.94 MiB/s, done.
Resolving deltas: 100% (86/86), done.
git clone https://github.com/bloeys/assimp-go
Cloning into 'assimp-go'...
remote: Enumerating objects: 234, done.
remote: Counting objects: 100% (234/234), done.
remote: Compressing objects: 100% (156/156), done.
remote: Total 234 (delta 110), reused 192 (delta 73), pack-reused 0
Receiving objects: 100% (234/234), 7.38 MiB | 6.45 MiB/s, done.
Resolving deltas: 100% (110/110), done.
#from: https://github.com/veandco/go-sdl2#requirements
brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config
Warning: sdl2 2.0.18 is already installed and up-to-date.
To reinstall 2.0.18, run:
brew reinstall sdl2
Warning: sdl2_image 2.0.5 is already installed and up-to-date.
To reinstall 2.0.5, run:
brew reinstall sdl2_image
Warning: sdl2_mixer 2.0.4_2 is already installed and up-to-date.
To reinstall 2.0.4_2, run:
brew reinstall sdl2_mixer
Warning: sdl2_ttf 2.0.15 is already installed and up-to-date.
To reinstall 2.0.15, run:
brew reinstall sdl2_ttf
Warning: sdl2_gfx 1.0.4 is already installed and up-to-date.
To reinstall 1.0.4, run:
brew reinstall sdl2_gfx
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
ls -al /usr/local/lib/pkgconfig
total 16
drwxr-xr-x 82 apple staff 2624 2 Dec 11:03 .
drwxr-xr-x 328 apple admin 10496 3 Dec 11:48 ..
lrwxr-xr-x 1 apple staff 53 15 Nov 14:41 SDL2_gfx.pc -> ../../Cellar/sdl2_gfx/1.0.4/lib/pkgconfig/SDL2_gfx.pc
lrwxr-xr-x 1 apple staff 57 15 Nov 14:40 SDL2_image.pc -> ../../Cellar/sdl2_image/2.0.5/lib/pkgconfig/SDL2_image.pc
lrwxr-xr-x 1 apple staff 59 15 Nov 14:40 SDL2_mixer.pc -> ../../Cellar/sdl2_mixer/2.0.4_2/lib/pkgconfig/SDL2_mixer.pc
lrwxr-xr-x 1 apple staff 54 15 Nov 14:41 SDL2_ttf.pc -> ../../Cellar/sdl2_ttf/2.0.15/lib/pkgconfig/SDL2_ttf.pc
lrwxr-xr-x 1 apple staff 51 17 Nov 10:15 fdk-aac.pc -> ../../Cellar/fdk-aac/2.0.2/lib/pkgconfig/fdk-aac.pc
lrwxr-xr-x 1 apple staff 47 15 Nov 14:40 flac++.pc -> ../../Cellar/flac/1.3.3/lib/pkgconfig/flac++.pc
lrwxr-xr-x 1 apple staff 45 15 Nov 14:40 flac.pc -> ../../Cellar/flac/1.3.3/lib/pkgconfig/flac.pc
-rw-r--r-- 1 apple staff 196 23 Aug 11:34 flatbuffers.pc
lrwxr-xr-x 1 apple staff 55 24 Sep 13:56 freetype2.pc -> ../../Cellar/freetype/2.11.0/lib/pkgconfig/freetype2.pc
lrwxr-xr-x 1 apple staff 10 24 Oct 2019 fuse.pc -> osxfuse.pc
lrwxr-xr-x 1 apple staff 45 24 Sep 12:39 gmp.pc -> ../../Cellar/gmp/6.2.1_1/lib/pkgconfig/gmp.pc
lrwxr-xr-x 1 apple staff 47 24 Sep 12:39 gmpxx.pc -> ../../Cellar/gmp/6.2.1_1/lib/pkgconfig/gmpxx.pc
lrwxr-xr-x 1 apple staff 69 17 Nov 15:45 groonga-normalizer-mysql.pc -> ../../Cellar/groonga/11.0.9/lib/pkgconfig/groonga-normalizer-mysql.pc
lrwxr-xr-x 1 apple staff 52 17 Nov 15:45 groonga.pc -> ../../Cellar/groonga/11.0.9/lib/pkgconfig/groonga.pc
lrwxr-xr-x 1 apple staff 52 24 Sep 13:56 jbig2dec.pc -> ../../Cellar/jbig2dec/0.19/lib/pkgconfig/jbig2dec.pc
lrwxr-xr-x 1 apple staff 58 10 Nov 12:12 libbrotlicommon.pc -> ../../Cellar/brotli/1.0.9/lib/pkgconfig/libbrotlicommon.pc
lrwxr-xr-x 1 apple staff 55 10 Nov 12:12 libbrotlidec.pc -> ../../Cellar/brotli/1.0.9/lib/pkgconfig/libbrotlidec.pc
lrwxr-xr-x 1 apple staff 55 10 Nov 12:12 libbrotlienc.pc -> ../../Cellar/brotli/1.0.9/lib/pkgconfig/libbrotlienc.pc
lrwxr-xr-x 1 apple staff 52 10 Nov 12:12 libcares.pc -> ../../Cellar/c-ares/1.18.1/lib/pkgconfig/libcares.pc
lrwxr-xr-x 1 apple staff 55 26 Nov 13:04 libecpg.pc -> ../../Cellar/postgresql/14.1_1/lib/pkgconfig/libecpg.pc
lrwxr-xr-x 1 apple staff 62 26 Nov 13:04 libecpg_compat.pc -> ../../Cellar/postgresql/14.1_1/lib/pkgconfig/libecpg_compat.pc
lrwxr-xr-x 1 apple staff 48 24 Sep 13:56 libidn.pc -> ../../Cellar/libidn/1.38/lib/pkgconfig/libidn.pc
lrwxr-xr-x 1 apple staff 51 25 Jul 12:02 libidn2.pc -> ../../Cellar/libidn2/2.3.2/lib/pkgconfig/libidn2.pc
lrwxr-xr-x 1 apple staff 73 24 Jun 10:29 libimobiledevice-1.0.pc -> ../../Cellar/libimobiledevice/1.3.0/lib/pkgconfig/libimobiledevice-1.0.pc
lrwxr-xr-x 1 apple staff 45 8 Feb 2021 libjpeg.pc -> ../../Cellar/jpeg/9d/lib/pkgconfig/libjpeg.pc
lrwxr-xr-x 1 apple staff 46 23 Apr 2021 liblzma.pc -> ../../Cellar/xz/5.2.5/lib/pkgconfig/liblzma.pc
lrwxr-xr-x 1 apple staff 55 29 Oct 11:20 libmariadb.pc -> ../../Cellar/mariadb/10.6.4/lib/pkgconfig/libmariadb.pc
lrwxr-xr-x 1 apple staff 59 15 Nov 14:40 libmodplug.pc -> ../../Cellar/libmodplug/0.8.9.0/lib/pkgconfig/libmodplug.pc
lrwxr-xr-x 1 apple staff 53 15 Nov 14:40 libmpg123.pc -> ../../Cellar/mpg123/1.29.2/lib/pkgconfig/libmpg123.pc
lrwxr-xr-x 1 apple staff 58 10 Nov 12:12 libnghttp2.pc -> ../../Cellar/libnghttp2/1.46.0/lib/pkgconfig/libnghttp2.pc
lrwxr-xr-x 1 apple staff 53 15 Nov 14:40 libout123.pc -> ../../Cellar/mpg123/1.29.2/lib/pkgconfig/libout123.pc
lrwxr-xr-x 1 apple staff 47 29 Oct 10:39 libpcre.pc -> ../../Cellar/pcre/8.45/lib/pkgconfig/libpcre.pc
lrwxr-xr-x 1 apple staff 49 29 Oct 10:39 libpcre16.pc -> ../../Cellar/pcre/8.45/lib/pkgconfig/libpcre16.pc
lrwxr-xr-x 1 apple staff 53 31 Oct 12:32 libpcre2-16.pc -> ../../Cellar/pcre2/10.39/lib/pkgconfig/libpcre2-16.pc
lrwxr-xr-x 1 apple staff 53 31 Oct 12:32 libpcre2-32.pc -> ../../Cellar/pcre2/10.39/lib/pkgconfig/libpcre2-32.pc
lrwxr-xr-x 1 apple staff 52 31 Oct 12:32 libpcre2-8.pc -> ../../Cellar/pcre2/10.39/lib/pkgconfig/libpcre2-8.pc
lrwxr-xr-x 1 apple staff 56 31 Oct 12:32 libpcre2-posix.pc -> ../../Cellar/pcre2/10.39/lib/pkgconfig/libpcre2-posix.pc
lrwxr-xr-x 1 apple staff 49 29 Oct 10:39 libpcre32.pc -> ../../Cellar/pcre/8.45/lib/pkgconfig/libpcre32.pc
lrwxr-xr-x 1 apple staff 50 29 Oct 10:39 libpcrecpp.pc -> ../../Cellar/pcre/8.45/lib/pkgconfig/libpcrecpp.pc
lrwxr-xr-x 1 apple staff 52 29 Oct 10:39 libpcreposix.pc -> ../../Cellar/pcre/8.45/lib/pkgconfig/libpcreposix.pc
lrwxr-xr-x 1 apple staff 58 26 Nov 13:04 libpgtypes.pc -> ../../Cellar/postgresql/14.1_1/lib/pkgconfig/libpgtypes.pc
lrwxr-xr-x 1 apple staff 59 24 Jun 10:28 libplist++-2.0.pc -> ../../Cellar/libplist/2.2.0/lib/pkgconfig/libplist++-2.0.pc
lrwxr-xr-x 1 apple staff 57 24 Jun 10:28 libplist-2.0.pc -> ../../Cellar/libplist/2.2.0/lib/pkgconfig/libplist-2.0.pc
lrwxr-xr-x 1 apple staff 50 8 Feb 2021 libpng.pc -> ../../Cellar/libpng/1.6.37/lib/pkgconfig/libpng.pc
lrwxr-xr-x 1 apple staff 52 8 Feb 2021 libpng16.pc -> ../../Cellar/libpng/1.6.37/lib/pkgconfig/libpng16.pc
lrwxr-xr-x 1 apple staff 53 26 Nov 13:04 libpq.pc -> ../../Cellar/postgresql/14.1_1/lib/pkgconfig/libpq.pc
lrwxr-xr-x 1 apple staff 53 15 Nov 14:40 libsyn123.pc -> ../../Cellar/mpg123/1.29.2/lib/pkgconfig/libsyn123.pc
lrwxr-xr-x 1 apple staff 54 11 Nov 14:20 libtasn1.pc -> ../../Cellar/libtasn1/4.18.0/lib/pkgconfig/libtasn1.pc
lrwxr-xr-x 1 apple staff 53 27 Apr 2021 libtiff-4.pc -> ../../Cellar/libtiff/4.3.0/lib/pkgconfig/libtiff-4.pc
lrwxr-xr-x 1 apple staff 54 24 Jun 10:28 libusb-1.0.pc -> ../../Cellar/libusb/1.0.24/lib/pkgconfig/libusb-1.0.pc
lrwxr-xr-x 1 apple staff 61 24 Jun 10:29 libusbmuxd-2.0.pc -> ../../Cellar/libusbmuxd/2.0.2/lib/pkgconfig/libusbmuxd-2.0.pc
lrwxr-xr-x 1 apple staff 48 10 Nov 12:12 libuv.pc -> ../../Cellar/libuv/1.42.0/lib/pkgconfig/libuv.pc
lrwxr-xr-x 1 apple staff 50 15 Nov 14:40 libwebp.pc -> ../../Cellar/webp/1.2.1_1/lib/pkgconfig/libwebp.pc
lrwxr-xr-x 1 apple staff 57 15 Nov 14:40 libwebpdecoder.pc -> ../../Cellar/webp/1.2.1_1/lib/pkgconfig/libwebpdecoder.pc
lrwxr-xr-x 1 apple staff 55 15 Nov 14:40 libwebpdemux.pc -> ../../Cellar/webp/1.2.1_1/lib/pkgconfig/libwebpdemux.pc
lrwxr-xr-x 1 apple staff 53 15 Nov 14:40 libwebpmux.pc -> ../../Cellar/webp/1.2.1_1/lib/pkgconfig/libwebpmux.pc
lrwxr-xr-x 1 apple staff 51 15 Oct 11:12 libzip.pc -> ../../Cellar/libzip/1.8.0_1/lib/pkgconfig/libzip.pc
lrwxr-xr-x 1 apple staff 48 15 Oct 11:12 libzstd.pc -> ../../Cellar/zstd/1.5.0/lib/pkgconfig/libzstd.pc
lrwxr-xr-x 1 apple staff 52 29 Oct 11:20 mariadb.pc -> ../../Cellar/mariadb/10.6.4/lib/pkgconfig/mariadb.pc
lrwxr-xr-x 1 apple staff 51 29 Oct 10:39 msgpack.pc -> ../../Cellar/msgpack/4.0.0/lib/pkgconfig/msgpack.pc
lrwxr-xr-x 1 apple staff 46 15 Nov 14:09 ogg.pc -> ../../Cellar/libogg/1.3.5/lib/pkgconfig/ogg.pc
lrwxr-xr-x 1 apple staff 57 30 Nov 21:21 oniguruma.pc -> ../../Cellar/oniguruma/6.9.7.1/lib/pkgconfig/oniguruma.pc
lrwxr-xr-x 1 apple staff 45 17 Nov 10:15 opus.pc -> ../../Cellar/opus/1.3.1/lib/pkgconfig/opus.pc
-rw-r--r-- 1 apple staff 258 1 Jul 2018 osxfuse.pc
lrwxr-xr-x 1 apple staff 61 2 Dec 11:03 protobuf-lite.pc -> ../../Cellar/protobuf/3.17.3_1/lib/pkgconfig/protobuf-lite.pc
lrwxr-xr-x 1 apple staff 56 2 Dec 11:03 protobuf.pc -> ../../Cellar/protobuf/3.17.3_1/lib/pkgconfig/protobuf.pc
lrwxr-xr-x 1 apple staff 63 26 Nov 13:05 python-3.9-embed.pc -> ../../Cellar/[email protected]/3.9.9/lib/pkgconfig/python-3.9-embed.pc
lrwxr-xr-x 1 apple staff 57 26 Nov 13:05 python-3.9.pc -> ../../Cellar/[email protected]/3.9.9/lib/pkgconfig/python-3.9.pc
lrwxr-xr-x 1 apple staff 60 26 Nov 13:05 python3-embed.pc -> ../../Cellar/[email protected]/3.9.9/lib/pkgconfig/python3-embed.pc
lrwxr-xr-x 1 apple staff 54 26 Nov 13:05 python3.pc -> ../../Cellar/[email protected]/3.9.9/lib/pkgconfig/python3.pc
lrwxr-xr-x 1 apple staff 46 17 Nov 10:16 sdl.pc -> ../../Cellar/sdl/1.2.15_3/lib/pkgconfig/sdl.pc
lrwxr-xr-x 1 apple staff 46 2 Dec 11:03 sdl2.pc -> ../../Cellar/sdl2/2.0.18/lib/pkgconfig/sdl2.pc
lrwxr-xr-x 1 apple staff 49 17 Nov 10:16 theora.pc -> ../../Cellar/theora/1.1.1/lib/pkgconfig/theora.pc
lrwxr-xr-x 1 apple staff 52 17 Nov 10:16 theoradec.pc -> ../../Cellar/theora/1.1.1/lib/pkgconfig/theoradec.pc
lrwxr-xr-x 1 apple staff 52 17 Nov 10:16 theoraenc.pc -> ../../Cellar/theora/1.1.1/lib/pkgconfig/theoraenc.pc
lrwxr-xr-x 1 apple staff 52 15 Nov 14:09 vorbis.pc -> ../../Cellar/libvorbis/1.3.7/lib/pkgconfig/vorbis.pc
lrwxr-xr-x 1 apple staff 55 15 Nov 14:09 vorbisenc.pc -> ../../Cellar/libvorbis/1.3.7/lib/pkgconfig/vorbisenc.pc
lrwxr-xr-x 1 apple staff 56 15 Nov 14:09 vorbisfile.pc -> ../../Cellar/libvorbis/1.3.7/lib/pkgconfig/vorbisfile.pc
lrwxr-xr-x 1 apple staff 47 17 Nov 10:15 vpx.pc -> ../../Cellar/libvpx/1.11.0/lib/pkgconfig/vpx.pc
lrwxr-xr-x 1 apple staff 45 17 Nov 10:16 x264.pc -> ../../Cellar/x264/r3060/lib/pkgconfig/x264.pc
# check that brew works and that sdl2 is there.
pkg-config --libs sdl2
-L/usr/local/lib -lSDL2
cd nmage && go build -o /Users/apple/workspace/go/src/github.com/gedw99/gio-tools/3d/bloeys__nmage/bin/nmage .
# github.com/inkyblackness/imgui-go/v4
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
# github.com/bloeys/assimp-go/asig
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:62:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/vector3.h:69:17: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:63:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/vector2.h:69:40: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:64:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/color4.h:62:16: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:65:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix3x3.h:72:19: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:66:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix4x4.h:74:19: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:67:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/quaternion.h:63:20: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:129:15: error: expected ';' at end of declaration list
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:146:13: error: expected ';' at end of declaration list
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:164:17: error: expected ';' at end of declaration list
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:266:15: error: expected ';' at end of declaration list
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:491:19: error: expected ';' at end of declaration list
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:537:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/quaternion.inl:83:30: error: out-of-line definition of 'aiQuaterniont<TReal>' does not match any declaration in 'aiQuaterniont<TReal>'
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:538:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix3x3.inl:71:50: error: out-of-line definition of 'operator*=' does not match any declaration in 'aiMatrix3x3t<TReal>'
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:539:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix4x4.inl:62:22: error: out-of-line declaration of a member must be a definition [-Wout-of-line-declaration]
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix4x4.inl:62:36: error: expected ';' at end of declaration
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix4x4.inl:62:37: error: unknown type name 'noexcept'
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/defs.h:301:24: note: expanded from macro 'AI_NO_EXCEPT'
In file included from wrap.cxx:1:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/cimport.h:51:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/types.h:539:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/matrix4x4.inl:62:50: error: expected unqualified-id
In file included from wrap.cxx:2:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/scene.h:52:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/texture.h:112:16: error: no matching constructor for initialization of 'aiColor4D' (aka 'aiColor4t<float>')
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/color4.h:59:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were provided
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/color4.h:62:5: note: candidate constructor not viable: requires 0 arguments, but 4 were provided
In file included from wrap.cxx:2:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/scene.h:52:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/texture.h:206:16: error: expected ';' at end of declaration list
In file included from wrap.cxx:2:
In file included from ../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/scene.h:53:
../../../../../../../pkg/mod/github.com/bloeys/[email protected]/asig/assimp/mesh.h:140:13: error: expected ';' at end of declaration list
fatal error: too many errors emitted, stopping now [-ferror-limit=]
make: *** [nmage-build] Error 2
➜ bloeys__nmage git:(main) ✗
BTW the previous build from a few weeks ago linked fine.
make nmage-otool
cd /Users/apple/workspace/go/src/github.com/gedw99/gio-tools/3d/bloeys__nmage/bin && otool -L ./nmage > otool.txt
cd /Users/apple/workspace/go/src/github.com/gedw99/gio-tools/3d/bloeys__nmage/bin && code otool.txt
./nmage:
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib (compatibility version 17.0.0, current version 17.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1200.3.0)
Wow it took me long to find this issue, for some reason I am not receiving notifications for this repo even though am watching it.
This got broken because of assimp which was introduced recently into the engine for model loading, but assimp-go requires built libraries for each platform, but I only built the C++ code for windows so far. I will make time for this and and confirm on my mac, but this will probably after new years (enjoy the holidays!)
If you are willing to help, I would say try to run assimp-go by itself, and if you get it to work just send me the binary (.a file produced from the C++ compilation) and we can officially support Mac.
Thanks for your interest!
Hey wanted to give an update. I managed to update assimp-go to support Apple CPUs so far and confirmed that nMage now works on ARM chips like the M1.
Now all I need is to find a way to cross-compile assimp from my M1 to an Intel CPU, or to get my hands on an Intel mac.
If you have an idea how I can cross-compile please share, it would help tons!
Once I have the Intel compiled .dylib files the update to actually support Intel Macit in assimp-go and nMage should be straightforward.
Hey @bloeys really nice of you to follow up and letting me know.
Can you put a makefile into https://github.com/bloeys/assimp-go ? it will make it much easier to then help. SO we can see the compiler setup for the flags.
I have also been down this road for cross compile golang code that is dependent on a c or c++ lib. You need a good template because knowing the C and CC FLags and can be a huge amount of research and work.
There are some examples out there of doing this. Docs: https://dh1tw.de/2019/12/cross-compiling-golang-cgo-projects/ Real example: https://github.com/dh1tw/remoteAudio/wiki Docker cross compiler: https://github.com/dh1tw/remoteAudio-xcompiler
Normally i use github CI to test, because setting it up on a mac can be heaps of bits a pieces. Or docker cross compiler if thats your bend... You don't need to fake the underlying compiler setup either. I tend to use a makefile and then just have the github workflow call the makefile. Example of this: https://github.com/amplify-edge/sys-share/blob/master/Makefile https://github.com/amplify-edge/sys-share/blob/master/.github/workflows/ci.yml#L50
Thanks a lot for taking the time and sharing the links with me, very useful! I have used other CICD systems before but not GitHub actions, but it seems nice as well, and I had no idea they supported MacOS.
So it seems I will be able to run a job on it to compile Assimp, then take the resulting dylib and include it in assimp-go, which should let us support windows, arm macs, and intel macs. Might make a repo that builds the original C++ Assimp for the different platforms through GitHub CI.
With that being said, do you think we need some Makefile for assimp-go and nmage? Because for these its download the pre-built DLL and go run.
Alright nMage should be up on Intel Macs now :D
I made this repo that builds assimp-go for Intel Macs, and added the dylib to a new assimp-go release. I also added a github action on assimp-go that builds and runs it on Intel Mac.
These are both passing now and I created a new assimp-go release. nMage also has a github workflow now that builds on intel Macs, so we should at least know quickly if we break something.
If you can, please test nMage on your Mac now and see if it works.
Thanks a lot for your help, this is a great improvement for nMage and co 😊
The reason for the makefile is o allow developers to run the same code locally as in CI.
the CI ( GitHub ) just calls the make file .
this is why I suggested it .
that is what the example I gave does :)
it has many advantages 👍
you don’t need to guess the CI and wait for it. If it runs locally , it runs in CI.
mit works cross platform. In the CI workflow the strategy pattern is used.
Dependency code of binaries are brought in use a make target called “dep-os”. It’s significant because it’s saying these are the things my repo code needs to build.
—-
But it’s a good first stab !! Having Mac OS and the cflsgs working is great .
There is another way to do this I discovered called “c-for-go”. I can show you an example if you want. It generates the golang wrapper code from the c code with a little manifest file to give it hints.
Ah that makes sense, although I hope we can get nmage to a stage where you just do go get ... and it auto-magically does the rest without you needing make or anything like that, assuming that's possible.
I did see the make file you mentioned, but for a start I wanted to get the simplest CI running. I also started on a windows build, but its just painful :) So for now since am developing on windows I will be the CI haha, until I get enough courage to fight MinGW and deal with Powershell.
'c-for-go' is new to me, but I did use SWIG before, which seems to have built-in support in go (you will find swig mentioned on the page). The first working version of assimp-go was generated using swig, but honestly I just hated the auto generated code. Not a nice developer experience.
So I decided for assimp-go (and recently physx-go) to do them by hand and hopefully provide a nice API with readable code. Thanks for the suggestion though ;) It does seem like c-for-go is more popular than swig, so will definitely look at it for the future.
Ok so lets leave the fancy pants CI for now :)
here is example using c-for-go: https://github.com/qieqieplus/gofaiss. Maybe its good, maybe not. I got that code compiling for mac. I needed it for a ML project.
I will pull the current code and give it a try and report back... cheers !
I just built a make file and built it for mac.
# https://github.com/bloeys/nmage
# dep:
# https://github.com/bloeys/assimp-go
# https://github.com/bloeys/assimp-builder
## build the golang on top of the c++
print:
@echo
@echo nmage 3d system
dep:
git clone https://github.com/bloeys/nmage
dep-delete:
rm -rf nmage
dep-os:
git clone https://github.com/bloeys/assimp-go
git clone https://github.com/bloeys/assimp-builder
dep-os-delete:
rm -rf assimp-go
rm -rf assimp-builder
NMG_REPO_NAME=nmage
NMG_BIN_NAME=nmage
NMG_BIN_FSPATH=$(GOPATH)/bin
NMG_BIN=$(NMG_BIN_FSPATH)/$(NMG_BIN_NAME)
nmg-print:
@echo nmage
@echo NMG_REPO_NAME: $(NMG_REPO_NAME)
@echo NMG_BIN_NAME: $(NMG_BIN_NAME)
@echo NMG_BIN_FSPATH: $(NMG_BIN_FSPATH)
@echo NMG_BIN: $(NMG_BIN)
@echo is Installed: $(shell which $(NMG_BIN_NAME))
nmg-build:
cd $(NMG_REPO_NAME) && go build -o $(NMG_BIN)
nmg-build-delete:
rm -f $(NMG_BIN)
### ASB: assimp-builder
ASB_REPO_NAME=assimp-builder
ASB_BIN_NAME=assimp-builder
ASB_BIN_FSPATH=$(PWD)/bin
ASB_BIN=$(ASB_BIN_FSPATH)/$(ASB_BIN_NAME)
export PKG_CONFIG_PATH=$(ASB_REPO_NAME)/pkgconfig
asb-print:
@echo c for go
@echo ASB_REPO_NAME: $(ASB_REPO_NAME)
@echo ASB_BIN_NAME: $(ASB_BIN_NAME)
@echo ASB_BIN_FSPATH: $(ASB_BIN_FSPATH)
@echo ASB_BIN: $(ASB_BIN)
@echo is Installed: $(shell which $(ASB_BIN_NAME))
asb-gen:
cd $(ASB_REPO_NAME) && chmod +x ./gen.sh && ./gen.sh
# out: faiss.yml
asb-ex-build:
cd $(ASB_REPO_NAME)/examples && go build -o $(ASB_BIN)
asb-ex-build-delete:
rm -f $(ASB_BIN)
when i run nmage i get:
nmage
dyld: Library not loaded: @rpath/libassimp.5.dylib
Referenced from: /Users/apple/workspace/go/bin/nmage
Reason: image not found
[1] 11366 abort nmage
again i cant stress how useful a makefile is for cross platform dev and making it easy for others to build your stuff. :) Would be good if you put this make file in the root.
Hey this make file looks good to me, once we get it to work feel free to make a PR and I'll be happy to merge ;)
As for the error, that's because you need to copy the assimp-go dylib, which is mentioned here, and you can see what the nmage CI is doing to install it here.
Its linked at runtime, so we have to copy it somewhere the OS will find it and link it, like /usr/local/lib.
Edit: We don't actually need assimp-builder for nmage, that simply produces the dll/dylib files, that are then put in the repo and release. To install nmage it should be enough to:
-
Get the assimp-go dylib (for example from a release) and install it as per the assimp-go readme
-
go run .the nmage repo
So I think the make file for nMage can be simplified.
Ok happy to PR the make file. Will make life easier :) I will just copy paste it into an Issue as i have not forked your stuff yet. Hope thats ok.
Yep i just worked out the dylib screwup :) will work it into the make file. you might have to adjust it and sniff for the OS and make little changes. I will template it out though for you so its obvious. just so you know, makefile's work on Windows. Microsoft finally got their shit together on that at least
Sounds good to me, just wanted to make sure you get the credit through a proper PR, if you want :)
also its good to hear makefiles finally work on Windows 😂, I only survive on windows because of stuff like Cygwin or Cmder haha
ok give me an hour.
Please take your time. Really appreciate the help and interest with nMage though :D!