Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos build failure using cmake #96

Open
ipatch opened this issue May 11, 2022 · 20 comments
Open

macos build failure using cmake #96

ipatch opened this issue May 11, 2022 · 20 comments

Comments

@ipatch
Copy link

ipatch commented May 11, 2022

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.

@looooo
Copy link
Collaborator

looooo commented May 11, 2022

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

@ipatch
Copy link
Author

ipatch commented May 11, 2022

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)

@looooo
Copy link
Collaborator

looooo commented May 11, 2022

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.

@ipatch
Copy link
Author

ipatch commented May 11, 2022

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

@looooo
Copy link
Collaborator

looooo commented May 11, 2022

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

hopefully soon osx_arm64 will join. Pyside2 is still missing.

@ipatch
Copy link
Author

ipatch commented May 11, 2022

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

@ageeye
Copy link

ageeye commented May 11, 2022

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.

@ipatch
Copy link
Author

ipatch commented May 11, 2022

@ageeye

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

@ageeye
Copy link

ageeye commented May 11, 2022

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

CMakeOutput.log
CMakeCache.txt
.

@ipatch
Copy link
Author

ipatch commented May 11, 2022

@ageeye

have you been able to build pivy with cmake?

@ageeye
Copy link

ageeye commented May 12, 2022

I'll test it at the weekend.

@ageeye
Copy link

ageeye commented May 15, 2022

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.

@luzpaz
Copy link
Contributor

luzpaz commented May 27, 2022

bumping for progress on FreeCAD/FreeCAD#6856

@luzpaz
Copy link
Contributor

luzpaz commented Jun 5, 2022

soft bump

@luzpaz
Copy link
Contributor

luzpaz commented Dec 29, 2022

bump

@luzpaz
Copy link
Contributor

luzpaz commented Apr 15, 2023

bumpity bump

@luzpaz
Copy link
Contributor

luzpaz commented Jun 1, 2023

Anyone?

@thyssentishman
Copy link

I'm running into the same error on OpenBSD 7.3 - current.

/usr/ports/pobj/py-pivy-0.6.8/build-amd64/pivy/coinPYTHON_wrap.cxx:9951:12: error: array type 'va_list' (aka '__builtin_va_list') is not assignable
      arg3 = *temp;
      ~~~~ ^
/usr/ports/pobj/py-pivy-0.6.8/build-amd64/pivy/coinPYTHON_wrap.cxx:9952: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.
ninja: build stopped: subcommand failed.

I'm using python-3.10.13, swig-4.1.0 and the latest coin-4.0.0. Any workarounds for this?

@thyssentishman
Copy link

thyssentishman commented Sep 18, 2023

Nevermind, using setup.py instead of cmake worked.

@bgbsww
Copy link

bgbsww commented Apr 23, 2024

I think the workaround for cmake is to add
%ignore SbString::vsprintf(const char * formatstr, va_list args);
to interfaces/soqt.i.

It isn't reasonable to assign a va_list.

Builds on ubuntu for python 3.12, swig 4.02, coin 4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants