FreeCAD / FreeCAD-snap

The official Snap package of the FreeCAD project
https://snapcraft.io/freecad
10 stars 10 forks source link

Daily build failure 2024-10-01 #119

Closed furgo16 closed 1 month ago

furgo16 commented 1 month ago

The latest daily build package failed to build: https://github.com/FreeCAD/FreeCAD-snap/actions/runs/11116512903

Extract from the logs:

:: [  2%] Built target AddonManager
:: [  2%] Linking CXX static library libfmt.a
:: [  2%] Built target fmt
:: gmake: *** [Makefile:146: all] Error 2
:: error:
:: Traceback (most recent call last):
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 110, in main
::     ret = CraftCtl.run(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 44, in run
::     _client(cmd, args)
::   File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 97, in _client
::     raise RuntimeError(message)
:: RuntimeError: Failed to run the build script for part 'freecad'.
'override-build' in part 'freecad' failed with code 1.
Review the scriptlet and make sure it's correct.
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20241001-004659.997089.log'
Error: Process completed with exit code 1.
furgo16 commented 1 month ago

It seems it wasn't a one off. Daily builds continue to fail.

Running snapcraft locally gives:

snapcraft --debug
Installed package repositories                                                                                                                                                  
'override-build' in part 'freecad' failed with code 1. '/workspace/usr/bin/shiboken2': File exists

The only reference I've found to this error is https://forum.freecad.org/viewtopic.php?style=5&t=63033

furgo16 commented 1 month ago

The line that symlinks shiboken2 would seem relevant to the error in the previous comment:

https://github.com/FreeCAD/FreeCAD-snap/blob/0a94095c164745c52acc44778e200ea1cb7f4b20/snap/snapcraft.yaml#L254-L259

furgo16 commented 1 month ago

This might do the trick, although I must admit I'm not sure why the symlinking is necessary in the first place.

-      mkdir -p /workspace/usr/bin
-      ln -s /usr/bin/shiboken2 /workspace/usr/bin/shiboken2
+      SHIBOKEN_BIN_PATH="/workspace/usr/bin/shiboken2"
+      if [ ! -e $SHIBOKEN_BIN_PATH ]
+        mkdir -p "$(dirname "${SHIBOKEN_BIN_PATH}")"
+        ln -s /usr/bin/shiboken2 $SHIBOKEN_BIN_PATH
+      fi