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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]_py310: ci fails to build bottles for gnu+linux #546

Open
ipatch opened this issue Jul 19, 2024 · 5 comments
Open

[email protected]_py310: ci fails to build bottles for gnu+linux #546

ipatch opened this issue Jul 19, 2024 · 5 comments
Assignees

Comments

@ipatch
Copy link
Collaborator

ipatch commented Jul 19, 2024

the current ci setup in this repo/tap uses the github provided ubuntu runner image, and some of the formula contained within this tap do contain bottles built for gnu+linux. however the formula [email protected]_py310 does not contain a bottle for gnu+linux due to the below build errors / issues when attempting to build using the github provided unbuntu runner images.

2024-07-17T23:38:23.7960603Z FAILED: src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o 
2024-07-17T23:38:23.7979620Z /home/linuxbrew/.linuxbrew/opt/llvm/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PP_VARIADICS=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"RelWithDebInfo\" -DFreeCADGui_EXPORTS -DHAVE_CONFIG_H -DHAVE_PYSIDE2 -DHAVE_SHIBOKEN2 -DNDEBUG -DPYCXX_6_2_COMPATIBILITY -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_OCC64 -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/FreeCADGui_autogen/include -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/Language -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/propertyeditor -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/TaskView -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/DAGView -I/home/linuxbrew/.linuxbrew/opt/eigen/include/eigen3 -I/home/linuxbrew/.linuxbrew/opt/coin3d_py310/include -I/home/linuxbrew/.linuxbrew/opt/xerces-c/include -I/home/linuxbrew/.linuxbrew/opt/zlib/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtCore -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtGui -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtWidgets -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/_deps/fmt-src/include -isystem /home/linuxbrew/.linuxbrew/Cellar/boost/1.85.0/include -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.10 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtCore -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/./mkspecs/linux-g++ -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtWidgets -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtGui -isystem /home/linuxbrew/.linuxbrew/opt/mesa/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtOpenGL -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtPrintSupport -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtSvg -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtNetwork -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtUiTools -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/shiboken2 -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtXml -Wall -Wextra -Wpedantic -Wno-write-strings  -Wno-undefined-var-template -O2 -g -DNDEBUG -std=gnu++17 -fPIC -I/home/linuxbrew/.linuxbrew/opt/open-mpi/include -fPIC -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o -MF src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o.d -o src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o -c /tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/SoFCOffscreenRenderer.cpp
2024-07-17T23:38:23.7980406Z /tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/SoFCOffscreenRenderer.cpp:42:11: fatal error: 'GL/glu.h' file not found
2024-07-17T23:38:23.7980508Z    42 | # include <GL/glu.h>
2024-07-17T23:38:23.7980666Z       |           ^~~~~~~~~~
2024-07-17T23:38:23.7980763Z 1 error generated.
2024-07-17T23:38:23.7998961Z [823/4963] /home/linuxbrew/.linuxbrew/opt/llvm/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PP_VARIADICS=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"RelWithDebInfo\" -DFreeCADGui_EXPORTS -DHAVE_CONFIG_H -DHAVE_PYSIDE2 -DHAVE_SHIBOKEN2 -DNDEBUG -DPYCXX_6_2_COMPATIBILITY -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_OCC64 -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/FreeCADGui_autogen/include -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/Language -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/propertyeditor -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/TaskView -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/src/Gui/DAGView -I/home/linuxbrew/.linuxbrew/opt/eigen/include/eigen3 -I/home/linuxbrew/.linuxbrew/opt/coin3d_py310/include -I/home/linuxbrew/.linuxbrew/opt/xerces-c/include -I/home/linuxbrew/.linuxbrew/opt/zlib/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtCore -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtGui -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtWidgets -I/tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/build/_deps/fmt-src/include -isystem /home/linuxbrew/.linuxbrew/Cellar/boost/1.85.0/include -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.10 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtCore -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/./mkspecs/linux-g++ -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtWidgets -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtGui -isystem /home/linuxbrew/.linuxbrew/opt/mesa/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtOpenGL -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtPrintSupport -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtSvg -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtNetwork -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtUiTools -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/shiboken2 -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtXml -Wall -Wextra -Wpedantic -Wno-write-strings  -Wno-undefined-var-template -O2 -g -DNDEBUG -std=gnu++17 -fPIC -I/home/linuxbrew/.linuxbrew/opt/open-mpi/include -fPIC -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/SoFCColorBar.cpp.o -MF src/Gui/CMakeFiles/FreeCADGui.dir/SoFCColorBar.cpp.o.d -o src/Gui/CMakeFiles/FreeCADGui.dir/SoFCColorBar.cpp.o -c /tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/SoFCColorBar.cpp
2024-07-17T23:38:23.7999544Z In file included from /tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/SoFCColorBar.cpp:37:
2024-07-17T23:38:23.8000502Z /tmp/freecadA0.21.2_py310-20240717-57832-hnvi4b/FreeCAD-0.21.2/src/Gui/SoFCColorBar.h:51:3: warning: 'getTypeId' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2024-07-17T23:38:23.8000738Z    51 |   SO_NODE_ABSTRACT_HEADER(Gui::SoFCColorBarBase);
2024-07-17T23:38:23.8000824Z       |   ^

from my limited testing, brew install freecad/freecad/freecad on my arch linux install (aka my daily driver). does indeed build and install freecad. so it maybe an issue specific to the github ci or how homebrew interacts with the github ci or the runner image provided by github.

more testing will be required, and i have not tested this issue with other distros of linux ...yet.

@ipatch ipatch self-assigned this Jul 19, 2024
@ipatch
Copy link
Collaborator Author

ipatch commented Oct 17, 2024

believe this is related to improper directory setup 🧐,

openglu_inc_dir = Formula["mesa"].opt_include

      puts "----------------------------------------------------"
      puts openglu_inc_dir
      puts "----------------------------------------------------"

i believe the above logic should be referencing the mesa-glu formula and not the mesa

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 17, 2024

see PR #575

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 17, 2024

#575 (comment)

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 27, 2024

hopefully i'll get this resolved using the below branch on my personal homebrew tap then update the effected formula in this tap when i find a fix.

https://github.com/ipatch/homebrew-us-05/tree/hello-world-opengl

https://github.com/ipatch/homebrew-us-05/blob/dev/Formula/hello_world_opengl.rb

@ipatch
Copy link
Collaborator Author

ipatch commented Nov 21, 2024

i think i might have finally figured this one out, 😮‍💨

the below files will all need to be patched,

brewer@linuxmbp /h/b/t/h/f/build [1]> rg --hidden --text --no-ignore -i "# include <GL/glu.h>" ../FreeCAD-0.21.2/
../FreeCAD-0.21.2/.brew_home/.local/share/fish/fish_history
83:- cmd: rg --hidden --text --no-ignore -i "# include <GL/glu.h>" ../FreeCAD-0.21.2/

../FreeCAD-0.21.2/src/Gui/GLBuffer.cpp
38:# include <GL/glu.h>

../FreeCAD-0.21.2/src/Gui/View3DInventorViewer.cpp
35:# include <GL/glu.h>

../FreeCAD-0.21.2/src/Gui/Quarter/SoQTQuarterAdaptor.cpp
39:# include <GL/glu.h>

i think unfortunately on linux using the cmake cmake variables from the cli prevents cmake from finding the glu.h header.

https://github.com/FreeCAD/homebrew-freecad/blob/8c794052eb381c69da39af94dabafcc72549e70f/Formula/freecad%400.21.2_py310.rb#L297C7-L300C77

-DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=FALSE
-DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=FALSE
-DCMAKE_IGNORE_PATH=#{hbp}/lib;#{hbp}/include/QtCore;#{hbp}/Cellar/qt;

patching the above mentioned file with the below,

#if !defined(FC_OS_MACOSX)
  # include <GL/gl.h>
  # if defined(__linux__) && defined(HOMEBREW_PREFIX)
    # pragma message("ipatch, HOMEBREW_PREFIX is: " HOMEBREW_PREFIX)
    // #define GLU_PATH HOMEBREW_PREFIX "/opt/mesa-glu/include/GL/glu.h"
    // #define GLU_PATH_STR TOSTRING(HOMEBREW_PREFIX "/opt/mesa-glu/include/GL/glu.h")
    // #pragma message("ipatch, Including GLU from: " GLU_PATH_STR)
    // # include GLU_PATH_STR
    // # pragma message("ipatch, GLU_PATH is: " GLU_PATH_STR)
    # include "/home/linuxbrew/.linuxbrew/opt/mesa-glu/include/GL/glu.h"
  # else
  #  include <GL/glu.h>
  # endif
  # include <GL/glext.h>
#endif

did increment the build further, but unfortunately it hard-codes the path of the HOMEBREW_PREFIX, so if someone is running linuxbrew with a non standard prefix i believe the build will still fail. so maybe a guard be added to only set that include if the below HOMEBREW_PREFIX is found. 🧐

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

1 participant