Errors during build

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
talletharm
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Nov 15, 2019 3:50 pm

Errors during build

Post by talletharm »

I am using wxWidgets 3.1.2 on a Linux machine. I want to build the wxFreeChart library and I tried to follow the instructions on their GitHub page but when I run ./configure , I get the following error message :

This is the link to the error log:
https://pastebin.com/UatTzvSJ


It's the last few lines that bother me, I have a gtk3 unicode static (non - debug) build of wxWidgets.

When I run the --with-toolkit command with ./configure, it does not show gtk3 as an option in the list of available toolkits, could this have something to do with the problem?

Any help would be appreciated.
Thanks
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Errors during build

Post by DavidHart »

Hi,
I am using wxWidgets 3.1.2 on a Linux machine.
Which distro/version? And a self-built wx? To where was it installed?
It's the last few lines that bother me, I have a gtk3 unicode static (non - debug) build of wxWidgets.
When I run the --with-toolkit command with ./configure, it does not show gtk3 as an option in the list of available toolkits, could this have something to do with the problem?
Yes, very much so.

What is the output of doing, in a terminal:
wx-config --list
wx-config --cxxflags --libs

Regards,

David
talletharm
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Nov 15, 2019 3:50 pm

Re: Errors during build

Post by talletharm »

Hi,
Which distro/version? And a self-built wx? To where was it installed?
Distro : Linux Mint 19.2 Tina x86_64

Yes, I built the library myself.

I did not specify any specific location so I think it was installed in the default location.
What is the output of doing, in a terminal:
wx-config --list
wx-config --cxxflags --libs
wx-config --list :

Code: Select all

 Default config is gtk3-unicode-static-3.1

  Default config will be used for output

  Alternate matches:
    gtk3-unicode-3.1

  Also available in /usr/local:
    x86_64-w64-mingw32-msw-unicode-static-3.1
I installed the mingw version because I was thinking about building for windows as well, but now I think I'll just rebuild my code on a Windows machine.

wx-config --cxxflags --libs

Code: Select all

-I/usr/local/lib/wx/include/gtk3-unicode-static-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread
-L/usr/local/lib -pthread   /usr/local/lib/libwx_gtk3u_xrc-3.1.a /usr/local/lib/libwx_gtk3u_qa-3.1.a /usr/local/lib/libwx_baseu_net-3.1.a /usr/local/lib/libwx_gtk3u_html-3.1.a /usr/local/lib/libwx_gtk3u_core-3.1.a /usr/local/lib/libwx_baseu_xml-3.1.a /usr/local/lib/libwx_baseu-3.1.a -lgthread-2.0 -pthread -lX11 -lXxf86vm -lSM -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lXtst -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lwxtiff-3.1 -lwxjpeg-3.1 -lwxregexu-3.1 -lwxscintilla-3.1 -lexpat -lpng -lz -ldl -lm 
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Errors during build

Post by DavidHart »

OK, so the wx build that gets found is your static-built one (why static? dynamic is used 99% of the time) in /usr/local. So that excludes the first possibility: that the 'correct' wx wasn't findable.

It might be that:
1) wxFreeChart, or its configure, can't cope with wxgtk3 builds
2) or with static wx builds
3) or that it can, but you have to pass some option to configure e.g. "--with-gtk=3", or "enable-static"

./configure --help might help. And/or, look in config.log (or whatever configure's log file is called) to see more detail about what went wrong, or in 'configure' itself to see what it wants.
talletharm
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Nov 15, 2019 3:50 pm

Re: Errors during build

Post by talletharm »

I already looked through the help for config.
I will read the config file to get some clues and get back to you.
I will also try it using a dynamic build.
If that doesn't work, I have some other alternatives in mind for making charts.

Thank you for your help
(PS : The reason I chose static was that the application I am planning to build is for a school project and it needs to run on lots of other people's computers for evaluation, so I didn't want any dependency troubles at that time)
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Errors during build

Post by DavidHart »

(PS : The reason I chose static was that the application I am planning to build is for a school project and it needs to run on lots of other people's computers for evaluation, so I didn't want any dependency troubles at that time)
In that case you would be far better off doing one of:
1) If they all use Mint 19, use its official wx3.0.* libs. They will only need the standard wx ones installed; you will need the -dev ones too. Link dynamically.
2) If they use various versions of various distros, a single executable won't work, static-built or not. It will depend on other libs that aren't installed, or ones that are not binary compatible with the Mint 19 ones. Instead create an AppImage or similar.
talletharm
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Nov 15, 2019 3:50 pm

Re: Errors during build

Post by talletharm »

1) If they all use Mint 19, use its official wx3.0.* libs. They will only need the standard wx ones installed; you will need the -dev ones too. Link dynamically.
Almost everyone runs Windows 10, and I was planning on writing and testing my application on my machine (because my VM is extremely slow due to memory constraints) , and then re-compile it on my Windows VM which already has wxWidgets installed.

Will a statically linked .exe file work on different windows machines? Or will it be better to just use dynamic linking here as well?
2) If they use various versions of various distros, a single executable won't work, static-built or not. It will depend on other libs that aren't installed, or ones that are not binary compatible with the Mint 19 ones. Instead create an AppImage or similar.
Thank you so much for this suggestion. Will AppImage also work with Windows executables if I decide to link them dynamically? Can it also act as a substitute for creating Installers to manage dependencies?
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Errors during build

Post by DavidHart »

I'm the wrong person to ask about Windows things, but afaik static-linking to wx is commonly used there, and so is far better tested than on Linux; and if 'everybody' uses Windows 10, you shouldn't have serious problems with other dependencies.

I've no personal experience with AppImage, but it requires all dependencies either to be installed or to be contained inside the Image; which implies that you'd need to copy most of Mint...
Post Reply