Opened 6 months ago

Closed 6 months ago

#17565 closed defect (fixed)

Mac ChimeraX build fails on spacenavigator

Reported by: Tom Goddard Owned by: Zach Pearson
Priority: high Milestone:
Component: Build System Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Building ChimeraX on a Mac (make build-from-scratch) now fails if spacenavigator libraries are missing. This work a week or two ago.

running build
running build_py
creating build/lib.macosx-10.9-universal2-cpython-311/chimerax/spacenavigator
copying src/init.py -> build/lib.macosx-10.9-universal2-cpython-311/chimerax/spacenavigator
copying src/snav.py -> build/lib.macosx-10.9-universal2-cpython-311/chimerax/spacenavigator
copying src/snavwin32.py -> build/lib.macosx-10.9-universal2-cpython-311/chimerax/spacenavigator
copying src/snavmac.py -> build/lib.macosx-10.9-universal2-cpython-311/chimerax/spacenavigator
running build_ext
building 'chimerax.spacenavigator._spacenavigator' extension
creating build/temp.macosx-10.9-universal2-cpython-311
clang++ -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/include -I/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chimerax/core/include -I/Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers -Isrc/include -I/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -I/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/include/python3.11 -c spacenav.cpp -o build/temp.macosx-10.9-universal2-cpython-311/spacenav.o -std=c++11 -stdlib=libc++ -mmacos-version-min=11
spacenav.cpp:33:10: fatal error: 'ConnexionClientAPI.h' file not found

33 | #include "ConnexionClientAPI.h"

| ~

1 error generated.
error: command '/usr/bin/clang++' failed with exit code 1
make[5]: * [wheel] Error 1
make[4]:
* [spacenavigator.build] Error 2
make[3]: * [install] Error 2
make[2]:
* [bundles.install] Error 2
make[1]: * [install] Error 2
make:
* [build-from-scratch] Error 2

Change History (2)

comment:1 by Zach Pearson, 6 months ago

I noticed mid-April that spacenavigator wasn't actually being built during builds, and XML bundle builder would just skip over it if that library wasn't on the system, including on GitHub. I converted the bundle to TOML, which is stricter.

setuptools.Extension takes a parameter 'optional' that defaults to False, and I'll update bundle builder to support it.

comment:2 by Zach Pearson, 6 months ago

Resolution: fixed
Status: assignedclosed

You can now put 'optional = true' in [tool.chimerax.extension.foo] tables and setuptools will skip the extension on error instead of failing the build. I updated spacenavigator's TOML file with optional=true and tested by commenting out the include directory in /Library/Frameworks/3DConnexionClient.framework

Then I did a build. I saw the compiler error go by but a wheel was made anyway.

Note: See TracTickets for help on using tickets.