Re: [kicad] Cannot compile Kicad (branches: master, 8.0, 7.0) due to the gal library

2024-04-26 Thread Jon Evans
What happens when you pass KICAD_USE_EGL=ON to cmake?

On Fri, Apr 26, 2024 at 3:26 PM Sven Wehrend
 wrote:
>
>
> I get the following error log:
>
> [  7%] Built target pcm_settings
> [  7%] Building CXX object 
> common/gal/CMakeFiles/gal.dir/__/draw_panel_gal.cpp.o
> In file included from 
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:32,
> from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:35,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /home/sven/development/software/kicad/include/gal/opengl/kiglew.h:53:14: 
> error: #error "KICAD_USE_EGL must be defined since wxWidgets has been 
> compiled with the EGL canvas"
>   53 | #error "KICAD_USE_EGL must be defined since wxWidgets has 
> been compiled with the EGL canvas"
>  |  ^
> In file included from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:35,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:46:28: 
> error: 'GL_VERTEX_SHADER' was not declared in this scope
>   46 | SHADER_TYPE_VERTEX   = GL_VERTEX_SHADER,///< Vertex shader
>  |^~~~
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:46:28: 
> note: the macro 'GL_VERTEX_SHADER' had not yet been defined
> In file included from /usr/include/GL/gl.h:2050,
> from /usr/include/wx-3.3/wx/unix/glegl.h:13,
> from /usr/include/wx-3.3/wx/gtk/glcanvas.h:16,
> from /usr/include/wx-3.3/wx/glcanvas.h:310,
> from 
> /home/sven/development/software/kicad/include/gal/hidpi_gl_canvas.h:30,
> from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:41,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /usr/include/GL/glext.h:600: note: it was later defined here
>  600 | #define GL_VERTEX_SHADER  0x8B31
>  |
> In file included from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:35,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:47:28: 
> error: 'GL_FRAGMENT_SHADER' was not declared in this scope
>   47 | SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER,  ///< Fragment shader
>  |^~
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:47:28: 
> note: the macro 'GL_FRAGMENT_SHADER' had not yet been defined
> In file included from /usr/include/GL/gl.h:2050,
> from /usr/include/wx-3.3/wx/unix/glegl.h:13,
> from /usr/include/wx-3.3/wx/gtk/glcanvas.h:16,
> from /usr/include/wx-3.3/wx/glcanvas.h:310,
> from 
> /home/sven/development/software/kicad/include/gal/hidpi_gl_canvas.h:30,
> from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:41,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /usr/include/GL/glext.h:599: note: it was later defined here
>  599 | #define GL_FRAGMENT_SHADER0x8B30
>  |
> In file included from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:35,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:48:28: 
> error: 'GL_GEOMETRY_SHADER' was not declared in this scope
>   48 | SHADER_TYPE_GEOMETRY = GL_GEOMETRY_SHADER   ///< Geometry shader
>  |^~
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:48:28: 
> note: the macro 'GL_GEOMETRY_SHADER' had not yet been defined
> In file included from /usr/include/GL/gl.h:2050,
> from /usr/include/wx-3.3/wx/unix/glegl.h:13,
> from /usr/include/wx-3.3/wx/gtk/glcanvas.h:16,
> from /usr/include/wx-3.3/wx/glcanvas.h:310,
> from 
> /home/sven/development/software/kicad/include/gal/hidpi_gl_canvas.h:30,
> from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:41,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /usr/include/GL/glext.h:1399: note: it was later defined here
> 1399 | #define GL_GEOMETRY_SHADER0x8DD9
>  |
> In file included from 
> /home/sven/development/software/kicad/include/gal/opengl/opengl_gal.h:35,
> from 
> /home/sven/development/software/kicad/common/draw_panel_gal.cpp:42:
> /home/sven/development/software/kicad/include/gal/opengl/shader.h:158:35: 
> error: 'GLuint' has not been declared
>  

Re: [kicad] Cannot compile Kicad (branches: master, 8.0, 7.0) due to the gal library

2024-04-26 Thread Jon Evans
Your CMake output does not show any errors.  It ends successfully.
What error do you get when you try to build?

On Fri, Apr 26, 2024 at 2:44 PM 'Sven Wehrend' via KiCad Developers
 wrote:
>
> Hello, I am new to the Kicad project but would like to contribute to give 
> back to the community. But right now I have build issues with the Kicad 
> soureces, I've tried master, 8.0 and 7.0... Every time it hungs up when 
> compiling the gal library - it looks like it doesnt find opengl but it is 
> installed and also passes on the cmake configure. Build environment is a 
> debian bullseye.
>
> Many thanks,
> Sven Wehrend
>
> '''
> Application: KiCad x86_64 on x86_64
>
> Version: 8.0.0, release build
>
> Libraries:
> wxWidgets 3.2.4
> FreeType 2.11.1
> HarfBuzz 8.3.0
> FontConfig 2.13.1
> libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 
> libidn2/2.3.2 libpsl/0.21.2 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib 
> nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.17
>
> Platform: Ubuntu Core 22, 64 bit, Little endian, wxGTK, X11, KDE, x11
>
> Build Info:
> Date: Mar 24 2024 13:47:43
> wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
> Boost: 1.74.0
> OCC: 7.5.1
> Curl: 7.81.0
> ngspice: 36
> Compiler: GCC 11.2.0 with C++ ABI 1016
>
> Build settings:
> KICAD_USE_EGL=ON
> '''
> Additional build info is:
>
> sven@debian:~/development/software/kicad/build/release$ cmake  
> -DCMAKE_BUILD_TYPE=RelWithDebInfo  ../../
> CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy):
>  The OLD behavior for policy CMP0116 will be removed from a future version
>  of CMake.
>
>  The cmake-policies(7) manual explains that the OLD behaviors of all
>  policies are deprecated and that a policy should be set to OLD only under
>  specific short-term circumstances.  Projects should be ported to the NEW
>  behavior and not rely on setting a policy to OLD.
>
>
> CMake Deprecation Warning at CMakeLists.txt:31 (cmake_policy):
>  The OLD behavior for policy CMP0113 will be removed from a future version
>  of CMake.
>
>  The cmake-policies(7) manual explains that the OLD behaviors of all
>  policies are deprecated and that a policy should be set to OLD only under
>  specific short-term circumstances.  Projects should be ported to the NEW
>  behavior and not rely on setting a policy to OLD.
>
>
> -- KiCad install dir: 
> -- Enabling warning -Wsuggest-override
> -- Enabling warning -Wduplicated-branches
> -- Enabling warning -Wduplicated-cond
> -- Enabling error for -Wvla
> -- Enabling warning -Wimplicit-fallthrough
> -- Enabling error for -Wreturn-type
> -- Enabling warning -Wshadow
> -- Enabling warning -Wsign-compare
> -- Enabling warning -Wmissing-field-initializers
> -- Enabling warning -Wempty-body
> -- Enabling warning -Wreorder
> -- Enabling warning -Wmismatched-tags
> -- Disabling warning -Wpsabi
> -- Configuring KiCad for the wxGLCanvas EGL backend
> -- Found OpenGL EGL library: /usr/lib/x86_64-linux-gnu/libEGL.so
> -- Check for installed ZLIB -- found
> -- Found Boost: 
> /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found 
> suitable version "1.74.0", minimum required is "1.71.0")
> -- Found the following HarfBuzz libraries:
> --  HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so
> -- Found OpenCASCADE Standard Edition version: 7.5.1
> --  ++ OpenCASCADE Standard Edition include directory: 
> /usr/include/opencascade
> --  ++ OpenCASCADE Standard Edition shared libraries directory: 
> /usr/lib/x86_64-linux-gnu
> -- Check for installed Python Interpreter -- found
> -- Python module install path: lib/python3.9/site-packages
> CMake Deprecation Warning at thirdparty/pybind11/CMakeLists.txt:8 
> (cmake_minimum_required):
>  Compatibility with CMake < 3.5 will be removed from a future version of
>  CMake.
>
>  Update the VERSION argument  value or use a ... suffix to tell
>  CMake that the project does not need compatibility with older versions.
>
>
> -- pybind11 v2.9.2
> -- Found wxPython Phoenix 4.2.1/gtk3 (wxWidgets 3.2.2.1)
> -- Found wxWidgets: 
> -pthread;;;-lwx_gtk3u_gl-3.3;-lwx_gtk3u_aui-3.3;-lwx_gtk3u_html-3.3;-lwx_gtk3u_core-3.3;-lwx_baseu_net-3.3;-lwx_baseu-3.3;-lwx_gtk3u_propgrid-3.3;-lwx_baseu_xml-3.3;-lwx_gtk3u_stc-3.3;-lwx_gtk3u_richtext-3.3
>  (found suitable version "3.3.0", minimum required is
> "3.2.2.1")
> -- Module support is disabled.
> -- Version: 9.0.0
> -- Build type: RelWithDebInfo
> -- CXX_STANDARD: 17
> -- Required features: cxx_variadic_templates
> CMake Deprecation Warning at thirdparty/nanodbc/CMakeLists.txt:1 
> (cmake_minimum_required):
>  Compatibility with CMake < 3.5 will be removed from a future version of
>  CMake.
>
>  Update the VERSION argument  value or use a ... suffix to tell
>  CMake that the project does not need compatibility with older versions.
>
>
> -- nanodbc version: 2.14.0
> -- nanodbc compile: C++14
> -- nanodbc feature: ODBC Version Override - OFF
> -- nanodbc feature: Disable async features - OFF
> -- nanodbc feature: Enable Unicode - ON
> 

[kicad] Cannot compile Kicad (branches: master, 8.0, 7.0) due to the gal library

2024-04-26 Thread 'Sven Wehrend' via KiCad Developers
Hello, I am new to the Kicad project but would like to contribute to give 
back to the community. But right now I have build issues with the Kicad 
soureces, I've tried master, 8.0 and 7.0... Every time it hungs up when 
compiling the gal library - it looks like it doesnt find opengl but it is 
installed and also passes on the cmake configure. Build environment is a 
debian bullseye.

Many thanks,
Sven Wehrend

'''
Application: KiCad x86_64 on x86_64

Version: 8.0.0, release build

Libraries:
wxWidgets 3.2.4
FreeType 2.11.1
HarfBuzz 8.3.0
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 
libidn2/2.3.2 libpsl/0.21.2 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib 
nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.17

Platform: Ubuntu Core 22, 64 bit, Little endian, wxGTK, X11, KDE, x11

Build Info:
Date: Mar 24 2024 13:47:43
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.1
Curl: 7.81.0
ngspice: 36
Compiler: GCC 11.2.0 with C++ ABI 1016

Build settings:
KICAD_USE_EGL=ON
'''
Additional build info is:

sven@debian:~/development/software/kicad/build/release$ cmake 
 -DCMAKE_BUILD_TYPE=RelWithDebInfo  ../../ 
CMake Deprecation Warning at CMakeLists.txt:27 (cmake_policy): 
 The OLD behavior for policy CMP0116 will be removed from a future version 
 of CMake. 

 The cmake-policies(7) manual explains that the OLD behaviors of all 
 policies are deprecated and that a policy should be set to OLD only under 
 specific short-term circumstances.  Projects should be ported to the NEW 
 behavior and not rely on setting a policy to OLD. 


CMake Deprecation Warning at CMakeLists.txt:31 (cmake_policy): 
 The OLD behavior for policy CMP0113 will be removed from a future version 
 of CMake. 

 The cmake-policies(7) manual explains that the OLD behaviors of all 
 policies are deprecated and that a policy should be set to OLD only under 
 specific short-term circumstances.  Projects should be ported to the NEW 
 behavior and not rely on setting a policy to OLD. 


-- KiCad install dir:  
-- Enabling warning -Wsuggest-override 
-- Enabling warning -Wduplicated-branches 
-- Enabling warning -Wduplicated-cond 
-- Enabling error for -Wvla 
-- Enabling warning -Wimplicit-fallthrough 
-- Enabling error for -Wreturn-type 
-- Enabling warning -Wshadow 
-- Enabling warning -Wsign-compare 
-- Enabling warning -Wmissing-field-initializers 
-- Enabling warning -Wempty-body 
-- Enabling warning -Wreorder 
-- Enabling warning -Wmismatched-tags 
-- Disabling warning -Wpsabi 
-- Configuring KiCad for the wxGLCanvas EGL backend 
-- Found OpenGL EGL library: /usr/lib/x86_64-linux-gnu/libEGL.so 
-- Check for installed ZLIB -- found 
-- Found Boost: 
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found 
suitable version "1.74.0", minimum required is "1.71.0") 
-- Found the following HarfBuzz libraries: 
--  HarfBuzz (required): /usr/lib/x86_64-linux-gnu/libharfbuzz.so 
-- Found OpenCASCADE Standard Edition version: 7.5.1 
--  ++ OpenCASCADE Standard Edition include directory: 
/usr/include/opencascade 
--  ++ OpenCASCADE Standard Edition shared libraries directory: 
/usr/lib/x86_64-linux-gnu 
-- Check for installed Python Interpreter -- found 
-- Python module install path: lib/python3.9/site-packages 
CMake Deprecation Warning at thirdparty/pybind11/CMakeLists.txt:8 
(cmake_minimum_required): 
 Compatibility with CMake < 3.5 will be removed from a future version of 
 CMake. 

 Update the VERSION argument  value or use a ... suffix to tell 
 CMake that the project does not need compatibility with older versions. 


-- pybind11 v2.9.2  
-- Found wxPython Phoenix 4.2.1/gtk3 (wxWidgets 3.2.2.1) 
-- Found wxWidgets: 
-pthread;;;-lwx_gtk3u_gl-3.3;-lwx_gtk3u_aui-3.3;-lwx_gtk3u_html-3.3;-lwx_gtk3u_core-3.3;-lwx_baseu_net-3.3;-lwx_baseu-3.3;-lwx_gtk3u_propgrid-3.3;-lwx_baseu_xml-3.3;-lwx_gtk3u_stc-3.3;-lwx_gtk3u_richtext-3.3
 
(found suitable version "3.3.0", minimum required is 
"3.2.2.1") 
-- Module support is disabled. 
-- Version: 9.0.0 
-- Build type: RelWithDebInfo 
-- CXX_STANDARD: 17 
-- Required features: cxx_variadic_templates 
CMake Deprecation Warning at thirdparty/nanodbc/CMakeLists.txt:1 
(cmake_minimum_required): 
 Compatibility with CMake < 3.5 will be removed from a future version of 
 CMake. 

 Update the VERSION argument  value or use a ... suffix to tell 
 CMake that the project does not need compatibility with older versions. 


-- nanodbc version: 2.14.0 
-- nanodbc compile: C++14 
-- nanodbc feature: ODBC Version Override - OFF 
-- nanodbc feature: Disable async features - OFF 
-- nanodbc feature: Enable Unicode - ON 
-- nanodbc feature: Enable Boost - ON 
-- nanodbc feature: Enable SQL_NO_DATA bug workaround - OFF 
-- nanodbc build: ODBC on Unix - unixODBC 
-- ODBC compile flags: -I/usr/include -DHAVE_UNISTD_H -DHAVE_PWD_H 
-DHAVE_SYS_TYPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=8 
-- ODBC link flags:  
CMake Deprecation Warning at