LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kicad nightly compile error (https://www.linuxquestions.org/questions/slackware-14/kicad-nightly-compile-error-4175689368/)

brodo 01-27-2021 02:43 PM

Kicad nightly compile error
 
Hello

I have a problem with compiling Kicad nightly (https://gitlab.com/kicad/code/kicad) :

Code:


In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30,
                from /usr/include/gtk-3.0/gdk/gdk.h:32,
                from /usr/include/gtk-3.0/gtk/gtk.h:30,
                from /tmp/SBo/kicad-master/libs/kiplatform/gtk/ui.cpp:28:
/usr/include/gtk-3.0/gdk/gdktypes.h:143:39: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
  143 | typedef struct _GdkWindow            GdkWindow;
      |                                      ^~~~~~~~~
In file included from /usr/include/wx-3.0/wx/cursor.h:14,
                from /tmp/SBo/kicad-master/libs/kiplatform/include/kiplatform/ui.h:24,
                from /tmp/SBo/kicad-master/libs/kiplatform/gtk/ui.cpp:21:
/usr/include/wx-3.0/wx/defs.h:3477:33: note: previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
 3477 |    typedef struct _GdkDrawable GdkWindow;
      |                                ^~~~~~~~~
make[2]: *** [libs/kiplatform/CMakeFiles/kiplatform.dir/build.make:108: libs/kiplatform/CMakeFiles/kiplatform.dir/gtk/ui.cpp.o] Error 1
make[2]: Leaving directory '/tmp/SBo/kicad-master/build'
make[1]: *** [CMakeFiles/Makefile2:2722: libs/kiplatform/CMakeFiles/kiplatform.dir/all] Error 2
make[1]: Leaving directory '/tmp/SBo/kicad-master/build'
make: *** [Makefile:182: all] Error 2

I use current Slackware as of 27-01-2021. My kicad slackbuild's cmake section is that:
Code:

cd build
  cmake \
    -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKICAD_DOCS=/usr/doc/$PRGNAM-$VERSION \
    -DKICAD_PLUGINS=/usr/lib${LIBDIRSUFFIX}/$PRGNAM/plugins \
    -DKICAD_STABLE_VERSION=OFF \
    -DKICAD_SKIP_BOOST=ON \
    -DKICAD_SCRIPTING=OFF \
    -DKICAD_SCRIPTING_MODULES=OFF \
    -DKICAD_SCRIPTING_WXPYTHON=OFF \
    -DKICAD_SCRIPTING_WXPYTHON4=OFF \
    -DKICAD_USE_SPICE=ON \
    -DKICAD_USE_OCC=ON \
    -DKICAD_USE_OCE=OFF \
    -DCMAKE_BUILD_TYPE=Release ..
  make VERBOSE=1
  make install DESTDIR=$PKG
cd ..

the wxGTK3 3.0.5 configure section looks that way:
Code:

./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --enable-mediactrl \
  --with-opengl \
  --enable-graphics_ctx \
  --with-gtk=2 \
  --enable-unicode \
  --enable-plugins \
  --enable-ipv6 \
  --enable-webview \
  $wk \
  $stl \
  $st \
  --build=$ARCH-slackware-linux


keefaz 01-27-2021 06:19 PM

Did you try a compiled wxGTK3 with --with-gtk=3 (just a guess)

brodo 01-28-2021 03:06 AM

Quote:

Originally Posted by keefaz (Post 6212805)
Did you try a compiled wxGTK3 with --with-gtk=3 (just a guess)

Yes, I tried. The same error unfortunately.

keefaz 01-28-2021 07:47 AM

You tried a new wxGTK3 compilation with cleaned source directory? (I mean run make clean before make)
What is the output with
Code:

wx-config --selected-config
Also I see Kicad recommends wxGTK3 3.0.2, not sure if 3.0.5 introduced this compilation error though

brodo 01-28-2021 08:43 AM

Quote:

Originally Posted by keefaz (Post 6212988)
You tried a new wxGTK3 compilation with cleaned source directory? (I mean run make clean before make)
What is the output with
Code:

wx-config --selected-config
Also I see Kicad recommends wxGTK3 3.0.2, not sure if 3.0.5 introduced this compilation error though

The
Code:

wx-config --selected-config
links to the

Code:

/usr/lib/wx/config/./gtk3-unicode-3.0 --selected-config
and the output is:
Code:

gtk3-unicode-3.0
I always compile software using slackbuilds with freshly cleaned /tmp/SBo, so no trash is involved.

keefaz 01-28-2021 11:32 AM

I don't know, I would be tempted to remove -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" and -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" from Kicad cmake options just to see

Or keep them but just before cmake, do
Code:

echo "SLKCFLAGS: $SLKCFLAGS"
To check...
Also maybe check log files in CMakeFiles directory, and other files like CMakeCache.txt, any configure files etc

brodo 01-28-2021 01:49 PM

The same error again. Are you able to compile kicad by yourself ?

kermitdafrog8 01-28-2021 03:54 PM

Kicad nightly compile error
 
I have problems with Kicad complaining about wxPython Phoenix on my computer instead of Classic. Do you use classic or Phoenix? And it doesn't find ngspice but it is installed.

brodo 01-28-2021 04:20 PM

Quote:

Originally Posted by kermitdafrog8 (Post 6213154)
I have problems with Kicad complaining about wxPython Phoenix on my computer instead of Classic. Do you use classic or Phoenix? And it doesn't find ngspice but it is installed.

When you look at my kicad slackbuild cmake section you'll see that I disabled wxPython scripting.
Just to make things easier, when I'll pass this wxGTK3 problem, I will then enable wxPython scripting.
We'll see if it would make another problem or not.

keefaz 01-28-2021 04:55 PM

Quote:

Originally Posted by brodo (Post 6213125)
The same error again. Are you able to compile kicad by yourself ?

Yes but my system is Slackware 14.2 (no current) and it uses gtk2-unicode-3.0


I see a post about forcing kicad to use gtk3 wx using cmake option:
Code:

-DwxWidgets_CONFIG_OPTIONS="--toolkit=gtk3"
https://forum.kicad.info/t/force-gtk3-build/14173/12


Also did you compile wxPython3 with --with-gtk=3 ?

brodo 01-28-2021 05:15 PM

Quote:

Originally Posted by keefaz (Post 6213186)
Yes but my system is Slackware 14.2 (no current) and it uses gtk2-unicode-3.0

I see a post about forcing kicad to use gtk3 wx using cmake option:
Code:

-DwxWidgets_CONFIG_OPTIONS="--toolkit=gtk3"
https://forum.kicad.info/t/force-gtk3-build/14173/12

Also did you compile wxPython3 with --with-gtk=3 ?

The DwxWidgets option does not work for me:
Code:

Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.0.0")

I disabled wxPython scripting in the cmake section. Will enable it later.

keefaz 01-28-2021 05:22 PM

Quote:

Originally Posted by brodo (Post 6213200)
The DwxWidgets option does not work for me:
Code:

Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.0.0")

I disabled wxPython scripting in the cmake section. Will enable it later.

Oh yes I see this option is set when wxPython option is also set, from what I see though (not expert on cmake)
https://gitlab.com/kicad/code/kicad/...CMakeLists.txt (line 871)


Just curious, is there a reason you want to build nightly release instead of stable (5.1.7)?
https://kicad.org/download/source/

brodo 01-28-2021 05:34 PM

Quote:

Originally Posted by keefaz (Post 6213208)
Oh yes I see this option is set when wxPython option is also set, from what I see though (not expert on cmake)
https://gitlab.com/kicad/code/kicad/...CMakeLists.txt (line 871)

Just curious, is there a reason you want to build nightly release instead of stable (5.1.7)?
https://kicad.org/download/source/

Kicad nightly is a much improved project than the stable one. The kicad forum is a good source of infos about it.
https://forum.kicad.info/

kermitdafrog8 01-29-2021 11:47 AM

Kicad nightly compile error
 
Any luck figuring it out? I noticed there is an option to use Phoenix instead of classic but I still get the same error as you.

brodo 01-29-2021 04:18 PM

Nothing new ...
Maybe we should look at other distros how they did it (deps, building scripts, etc.).
Certainly there are people that are properly compiling Kicad 5.99 Nightly.

There is another project worth trying that compiles well in our Slackware:
horizon-eda.org


All times are GMT -5. The time now is 02:01 AM.