coin3d / pivy

python bindings to coin3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macos build failure using cmake

ipatch opened this issue Β· comments

commented

hello πŸ‘‹,

i've been attempting build pivy from source from the latest git master HEAD and also from the 0.6.7 tarball release on macos catalina but have been running into build failures.

i realize pivy requires a dependency on coin3d, and built coin from the latest tarball and from git master head without any issues from building and linking against python 3.10 more specifically the homebrew installation of python@3.10 on an intel mac.

the cmake commands i'm using are below,

cd /opt/code/github/public/forks/freecad-git/deps/pivy-git/pivy.src/build/build.git.master.head

cmake 
-DCMAKE_PREFIX_PATH=$bp/Cellar/coin3d-py3_10@4.0.0/HEAD-bad7605 \
 ../..
STDOUT from above ☝️ cmake command
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: /usr/local/bin/swig (found suitable version "4.0.2", minimum required is "4.0.0")
-- Could NOT find SoQt (missing: SoQt_DIR)
-- Found Python: /usr/local/Frameworks/Python.framework/Versions/3.10/bin/python3.10 (found version "3.10.4") found components: Interpreter Development Development.Module Development.Embed
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/code/github/public/forks/freecad-git/deps/pivy-git/pivy.src/build/build.git.master.head

i then run make and that produces the below πŸ‘‡ error message

make cmd / build error STDOUT
InternalEvent(SbName const &) not supported (incomplete type checking rule - no precedence level in typecheck typemap for 'SbName const &').
[ 33%] Built target coin_swig_compilation
[ 66%] Building CXX object interfaces/CMakeFiles/coin.dir/__/pivy/coinPYTHON_wrap.cxx.o
/opt/code/github/public/forks/freecad-git/deps/pivy-git/pivy.src/build/build.git.master.head/pivy/coinPYTHON_wrap.cxx:9622:12: error: array type
      'va_list' (aka '__builtin_va_list') is not assignable
      arg3 = *temp;
      ~~~~ ^
/opt/code/github/public/forks/freecad-git/deps/pivy-git/pivy.src/build/build.git.master.head/pivy/coinPYTHON_wrap.cxx:9623:32: warning: 'delete'
      applied to a pointer-to-array type 'va_list *' (aka '__builtin_va_list *') treated as 'delete[]'
      if (SWIG_IsNewObj(res3)) delete temp;
                               ^      ~~~~
                                     []
1 warning and 1 error generated.
make[2]: *** [interfaces/CMakeFiles/coin.dir/__/pivy/coinPYTHON_wrap.cxx.o] Error 1
make[1]: *** [interfaces/CMakeFiles/coin.dir/all] Error 2
make: *** [all] Error 2

if the entire output from running the make cmd is helpful let me know and i'll gladly post the entire output.

Which swig version are you using? I can remember having a similar problem long ago, but I can't remember the solution.

commented

for what it's worth, im only running into build issues using the cmake procedure. i took look at how the arch package is setup and installed,

https://github.com/archlinux/svntogit-community/blob/packages/python-pivy/trunk/PKGBUILD

and used the python command from the above link, and was able to build pivy on macos catalina using python 3.10 with the latest HEAD of coin3d.

the command i used to build pivy is below

python3 setup.py install --prefix=../installs/ --root=(pwd)

nice to see this is still working. Not sure about the issue with cmake. I am testing this with conda and do not see such issues.

commented

curious, what platform and what OS are you using to test the conda cmake procedure with?

https://github.com/coin3d/pivy/runs/6227287786?check_suite_focus=true

hopefully soon osx_arm64 will join. Pyside2 is still missing.

commented

coin3d/pivy/runs/6227287786?check_suite_focus=true

hopefully soon osx_arm64 will join. Pyside2 is still missing.

on a separate but related issue regarding python 3.10 i was able to build both pyside and shiboken 5.15.3 using python 3.10 thanks to a patch from the arch linux distro. you can see how i set things up with the homebrew formula below, if that helps,

https://github.com/FreeCAD/homebrew-freecad/blob/master/Formula/pyside2%405.15.3.rb

I used for pyside2 a patch from Fedro. That included some more changes than your fix. But since I updated to QT 5.15.3, I do not need a fix for pyside2. Conda used an older QT tree.

Swig version is 4.0.2.

commented

@ageeye

are you able to build pivy on macos using cmake? and if so, what are the steps you are using?

I used setup.py. Attached are the cmake logs.

CMakeOutput.log
CMakeCache.txt
.

commented

@ageeye

have you been able to build pivy with cmake?

I'll test it at the weekend.

First step I get the export stuff by edit the formula with "brew edit .../freecad/pivy" and add the line " system "export -p". Then the standard stuff:

export ..
git clone https://github.com/coin3d/pivy.git   
mkdir build
cd build
cmake ../pivy
make -j8

Works fine with a lot of warnings.

bumping for progress on FreeCAD/FreeCAD#6856

soft bump

bump

commented

bumpity bump

commented

Anyone?