Regarding OpenGL, this may be of interest and encouraging: ( http://www.raspberryconnect.com/gamessoftware/item/314-trying_out_opengl_on_raspberry_pi_3 ) As for solutions, they aren’t going to walk through the door on their own. And if you do get a problem solved, it does bring along some satisfaction.
There is also a document on how to convert GL applications to GLES that might be useful, and that shows the differences between GL and GLES quite nicely.
Thanks for the reference. My first challenge is to see if I can get just the KiCad executable running. Need to run down the source and some build instructions. I’ve got the newest Raspbian installed. I know these are different applications, but LibreCAD must be relying heavily on OpenGL capabilities. And then the games which place the ultimate demands on graphics. There are a zillion pi 3 boards out there. Me thinks expanding where KiCad can be installed is helpful (to everyone). My hunch is your KiCad 5 will run well on the pi 3. I also may go down in flames trying this. One won’t know until some effort is put into it.
Best - Scott
I don’t think it is a great idea, but it worked for me.
@Muniac I have the Pi B+ I think it is; it is not very old. It has a decent SD card in it, an Amplim 32G class 10. Loaded onto the card is BerryBoot and Ubuntu Mate 16.04 and I think this is because Raspbian did not work for some reason. At the time I did this there was an ARM KiCad on the main page, and my RasPi is running KiCad V4.0.2 according to the help window.
I just tried all 3 graphics modes, and OpenGL seemed to work reasonably well in PcbNew. If V5 were compiled for the RasPi I would expect similar results.
Thanks for diving into this. It’s good information. I did try Ubuntu 16.04 with no luck on my pi 3 model B trying to install KiCad V5. I think the program can/will run with acceptable performance. We’ll see as this unfolds. I’m sure I’ll be back with bottlenecks. Take care.
Best - Scott
OK - The exercise begins: I’ve downloaded the KiCad V5 source and looking at the build instructions. Some requirements in there that need attention.
- Install wxWidgets being the first challenge.
There isn’t anything ready to go for arm7hf which was expected. So I’m trying to build this from source. ./configure yielded the details below:
================================ pi@raspberrypi:~/wxWidgets-3.1.2 $ ./configure checking build system type... armv7l-unknown-linux-gnueabihf checking host system type... armv7l-unknown-linux-gnueabihf checking for toolkit... gtk checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether we are using the Intel C compiler... no checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking whether gcc needs -traditional... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking whether we are using the Intel C++ compiler... no checking whether we are using the Sun C++ compiler... no checking for ar... ar checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for langinfo.h... yes checking for wchar.h... yes checking for sys/select.h... yes checking for cxxabi.h... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking size of short... 2 checking size of void *... 4 checking size of int... 4 checking size of long... 4 checking size of size_t... 4 checking size of long long... 8 checking size of wchar_t... 4 checking for va_copy... yes checking whether the compiler supports variadic macros... yes checking for _FILE_OFFSET_BITS value needed for large files... 64 checking if large file support is available... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking whether byte ordering is bigendian... no checking for iostream... yes checking for std::wstring in <string>... yes checking for std::istream... yes checking for std::ostream... yes checking for type_traits... yes checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes checking for libraries directories... /usr/lib checking for cos... no checking for floor... no checking if floating point functions link without -lm... no checking for sin... yes checking for ceil... yes checking if floating point functions link with -lm... yes checking for strtoull... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes configure: WARNING: Defaulting to the builtin regex library for Unicode build. checking for zlib.h >= 1.1.4... yes checking for zlib.h... (cached) yes checking for deflate in -lz... yes checking for png.h > 0.90... yes checking for png.h... (cached) yes checking for png_sig_cmp in -lpng... yes checking for jpeglib.h... no configure: WARNING: system jpeg library not found, will use built-in instead checking lzma.h usability... no checking lzma.h presence... no checking for lzma.h... no checking for jbg_dec_init in -ljbig... no checking for tiffio.h... no configure: WARNING: system tiff library not found, will use built-in instead checking for expat.h... yes checking if expat.h is valid C++ header... yes checking for XML_ParserCreate in -lexpat... yes checking for GTK+ version... checking for pkg-config... (cached) /usr/bin/pkg-config checking pkg-config is at least version 0.7... yes checking for GTK+ - version >= 2.6.0... Package gtk+-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-2.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. checking for pkg-config... /usr/bin/pkg-config checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-3.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-3.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occurred. This usually means GTK+ is incorrectly installed. checking for gtk-config... no checking for GTK - version >= 1.2.7... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. checking for gtk-config... (cached) no checking for GTK - version >= 1.2.3... no *** The gtk-config script installed by GTK could not be found *** If GTK was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the GTK_CONFIG environment variable to the *** full path to gtk-config. configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. =============================================
Package gtk±2.0 is not found so I’m endeavoring to solve that problem. Running things down 1 at a time hoping to get a clean configure. We’ll see how it goes.
Best - Scott
KiCad 5.1 can be configured also for wxWidgets+GTK3. You can try that if GTK2 doesn’t work.
You need to install libgtk2.0-dev or libgtk-3-dev package.
OK I got libgtk installed. Files are below:
libgtk-3.so.0 - Sym link
libgtk-3.so - Sym link
Configure is still complaining: Package gtk±2.0 was not found in the pkg-config search path.
Does anyone know the exact name of the file configure is looking for so I can create a symbolic link to it? I don’t think it’s the search path as other libraries are found. Many thanks for the assistance.
Maybe libgtk-2.so ??
Best - Scott
You need to install sources, not just library. If you note in my post I have
xxxx-dev packages, those are the ones that install sources. Without them you can’t compile wxWidgets.
Raspbian is sufficiently similar to Debian that you should get by with the building instructions from the Debian download page.
qu1ck - I did install the libgtk-3-dev package using sudo apt-get install. The install completed without errors. I’m assuming that means everything got installed including the source. “configure” wants to confirm a library which it can’t find. More fundamental is wxWidgets configure is reporting “armv7l-unknown-linux-gnueabihf” (via config.log). This means it doesn’t know where to look for certain files in an unknown architecture. It thus makes assumptions, some correct and others ???. Need to dig more in the wxWidgets camp. I suspect this could be corrected with proper file/directory names. But which ones and what names??
The log shows status on checks for a “toolkit” and reports gtk. It’s also passing gcc a -V option to check on the compiler. -V is unrecognized and it should be -v which returns all the compiler version info. Raspbian gcc is v6.3.0 several versions old. Tons of little missing and/or incorrect details. Any one of which shuts things down.
Gyros - Thanks. KiCad 5 debian complained about a missing package with no details. I used the package installer which isn’t a wealth of details on Raspbian. KiCad 4 seemed to install without problems. I’m able to at least launch the application.
I can post config.log but it’s a monster!
Thanks for ongoing assistance.
Best - Scott
Perhaps some progress. It took a good 5+ hours to grind through the wxWidgets make. The make install went much faster. Status reported below:
The installation of wxWidgets is finished. On certain
platforms (e.g. Linux) you’ll now have to run ldconfig
if you installed a shared library and also modify the
LD_LIBRARY_PATH (or equivalent) environment variable.
wxWidgets comes with no guarantees and doesn’t claim
to be suitable for any purpose.
Read the wxWindows Licence on licencing conditions.
Despite some errors it appears this got installed. More work to be done.
So does virtually any software ever made. That’s just legalese for “take it or leave it, don’t sue me either way”.
I think that was the message from wxWindows, not from Muniac…
Yes the disclaimer was from “make install”. Pretty standard stuff in a litigious society. I was more concerned about the installation part of the message. Perhaps one requirement checked off for KiCad v5 on the pi. Need to go back and continue with the build instructions. It also seems the v2 libgtk install (instead of v3) solved some other missing file(s) issues. I’ll keep the update coming. Thanks.
Best - Scott
Would anyone have a small C program they can post to exercise a few wxWidgets functions. Would help to verify it’s installed and running at some basic level. Thanks.
There is sample program here (full code at the end of the page)
Thanks. I did poke around in the wxWidgets directory and they have included a lot of tests, benchmarks, games, etc. I was able to use the provided “make” to get executables created. Surprisingly they compiled and linked. I ran several which produced windows, mouse control, etc. Looked like these are working. Only the “bombs” game came back with a floating point exception. I’ll try to get some screen shots of these. This is running the wxWidgets-3.1.2 version. So perhaps some progress for the pi platform.
There is an exhaustive set of tests they included to be run. I gather this pushes the library in all directions.
Not a 5 minute activity to check all its features.
pi@raspberrypi:~/wxWidgets-3.1.2/tests $ ls -d */
any/ exec/ graphics/ misc/ uris/
archive/ file/ hashes/ net/ validators/
arrays/ filekind/ html/ persistence/ vectors/
base64/ filename/ image/ regex/ weakref/
benchmarks/ filesys/ interactive/ scopeguard/ window/
cmdline/ font/ intl/ sizers/ xlocale/
config/ fontmap/ lists/ streams/ xml/
controls/ formatconverter/ log/ strings/
datetime/ fswatcher/ longlong/ textfile/
drawing/ fuzz/ mbconv/ thread/
events/ geometry/ menu/ toplevel/
pi@raspberrypi:~/wxWidgets-3.1.2/tests $ ls .
asserthelper.cpp makefile.vc test_vc11.sln
asserthelper.h runtests.bat test_vc12.sln
descrip.mms testableframe.cpp test_vc14.sln
dummy.cpp testableframe.h test_vc15.sln
horse.ani test.bkl test_vc7_test_drawingplugin.vcproj
horse.bmp test.cpp test_vc7_test_drawing.vcproj
horse.cur testdata.fc test_vc7_test_gui.vcproj
horse.gif testdate.h test_vc7_test.vcproj
horse.ico testfile.h test_vc8_test_drawingplugin.vcproj
horse.jpg test_gui_vc10.sln test_vc8_test_drawing.vcproj
horse.pcx test_gui_vc11.sln test_vc8_test_gui.vcproj
horse.png test_gui_vc12.sln test_vc8_test.vcproj
horse.pnm test_gui_vc14.sln test_vc9_test_drawingplugin.vcproj
horse.tga test_gui_vc15.sln test_vc9_test_drawing.vcproj
horse.tif test_gui.vcxproj test_vc9_test_gui.vcproj
horse.xpm test_gui.vcxproj.filters test_vc9_test.vcproj
makefile.bcc testimage.h test.vcxproj
makefile.gcc testprec.h test.vcxproj.filters
Best - Scott