Configure question, Installing in Ubuntu 16.04

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.
AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Configure question, Installing in Ubuntu 16.04

Postby AshtonC1 » Sun Mar 19, 2017 6:09 pm

I'm trying to install wxWidgets properly in Ubuntu for the first time, but all of the specific directions i'm finding fail for me at one point, the ../Configure step.

This isn't directly relating to wxWidgets I know, but I'm hoping someone could assist a bit.

These are the steps I'm following, but at the Configure of step 3, 'bash: ../configure: No such file or directory' is displayed.

1. $ sudo apt-get install libgtk-3-dev build-essential checkinstall
2. $ mkdir gtk-build
$ cd gtk-build/
3. $ ../configure --disable-shared --enable-unicode
$ make

Any advice appreciated

DavidHart
Site Admin
Site Admin
Posts: 3615
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Configure question, Installing in Ubuntu 16.04

Postby DavidHart » Sun Mar 19, 2017 7:25 pm

Hi,

Well, is there a file called 'configure' in gtk-build's parent dir? If not, the error message is unsurprising. Did you mkdir starting in the top dir of the wxWidgets extracted source?

If there is a file there called 'configure', it's hard to guess why it fails. Do you own the file? Does it have sensible permissions?

Regards,

David

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Configure question, Installing in Ubuntu 16.04

Postby AshtonC1 » Sun Mar 19, 2017 9:13 pm

David,

I succeeded in the configuration, and build.
There were two configure files, one with .in.

I must have been in the wrong current directory, and didn't realize this was a file name that accompanied wxWidget files.

Thank you.

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Configure question, Installing in Ubuntu 16.04

Postby AshtonC1 » Sun Mar 19, 2017 11:20 pm

I have a followup related question if I may.

I'm following these instructions:
http://www.binarytides.com/install-wxwidgets-ubuntu/

Step 4. is using:
$ sudo checkinstall

But failed with the following result:

Code: Select all

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ root@me-OptiPlex-780 ]
1 -  Summary: [ wxWidgets302 ]
2 -  Name:    [ gtk ]
3 -  Version: [ build ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ gtk-build ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ gtk ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install...

========================= Installation results ===========================
make: *** No rule to make target '/home/me/wxWidgets302/gtk-build/lib/wx/include/gtk3-unicode-static-3.0/wx/setup.h', needed by 'wxregex_regcomp.o'.  Stop.

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.



Any suggestions appreciated.

DavidHart
Site Admin
Site Admin
Posts: 3615
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Configure question, Installing in Ubuntu 16.04

Postby DavidHart » Mon Mar 20, 2017 10:17 am

I have a followup related question if I may.

It's sufficiently unrelated that a separate topic would have been better...


I've no experience of using checkinstall, and I can't guess why it is failing. However that link prompts various more general points and questions:

    1) Why are you doing this? What is your ultimate goal, and why have you chosen this approach?
      1a) Why not use the wxWidgets packages supplied by your version of ubuntu? That's the normal way to do things on Linux; it's not always possible e.g. if your distro/version doesn't supply wx, or not a recent-enough version, but it saves you having to package wx yourself.
      1b) Why are you building wx statically-linked? That's normal for Windows but not on Linux, partly because of 1a).
    2) Your checkinstall build has one definite error, and another that's suspicious. The error is the License field: wxWidgets is released under the wxWindows licence, not GPL. And the Provides field says 'gtk', which I would understand as meaning you are packaging gtk+, not wxWidgets. (However I've no experience of using checkinstall...)

    3) 'No rule to make target '/home/me/wxWidgets302/gtk-build/lib/wx/include/gtk3-unicode-static-3.0/wx/setup.h': Does that filepath exist?

Finally, when someone asks how I'd build wx on Linux, the answer is usually:

Code: Select all

mkdir gtk-build && cd gtk-build && \
../configure --enable-debug {any other options, e.g. --with-gtk=3} --prefix=$(pwd) && make -j

The enable-debug option isn't necessary nowadays (all Unix wx builds are debug) but iiuc it adds debug symbols to the samples. However the important bit is prefix=. This 'installs' the build inside gtk-build/ and there's no need to 'make install'. It allows multiple different wx builds to co-exist if you put them in separate subdirs, and it avoids clashes with your distro's wx.
To use the build, point to it when you build your program: in a terminal, first do PATH=/full/path/to/gtk-build:$PATH, or if you use an IDE, put things like /full/path/to/gtk-build/wx-config --cxxflags in the IDE's Compiler field, and similarly with --libs in the Linker field.

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Configure question, Installing in Ubuntu 16.04

Postby AshtonC1 » Tue Mar 21, 2017 1:59 am

Thanks David.
1) Why are you doing this? What is your ultimate goal, and why have you chosen this approach?
1a) Why not use the wxWidgets packages supplied by your version of ubuntu? That's the normal way to do things on Linux; it's not always possible e.g. if your distro/version doesn't supply wx, or not a recent-enough version, but it saves you having to package wx yourself.


I have looked for a wxWidgets package supplied by Ubuntu, but found none listed (where I looked). The only downloads were 'Source for Linux'.
Every article I found was command-line load and build. Many for old versions. Not sure if packages for CodeLite work with Code::Blocks, or if there is a difference,

I have seen numerous different setup & install instructions, many slightly different, it is a bit confusing.

DavidHart
Site Admin
Site Admin
Posts: 3615
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Configure question, Installing in Ubuntu 16.04

Postby DavidHart » Tue Mar 21, 2017 9:51 am

I have looked for a wxWidgets package supplied by Ubuntu, but found none listed

sudo apt install libwxgtk3.0-dev
will get you the main packages and their dependencies. Or a search for libwxgtk* will catch the supplementary webview and media ones.

I have seen numerous different setup & install instructions, many slightly different, it is a bit confusing.

I agree. But the source-code has the official instructions. Look in docs/gtk/ and you'll find readme.txt with the bare essentials, and install.txt with a lot more detail.

AshtonC1
Earned some good credits
Earned some good credits
Posts: 100
Joined: Wed Feb 18, 2015 4:56 pm

Re: Configure question, Installing in Ubuntu 16.04

Postby AshtonC1 » Wed Mar 22, 2017 12:50 am

David,
Here is the result:

me@me-OptiPlex-780:~$ sudo apt install libwxgtk3.0-dev
[sudo] password for me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libwxgtk3.0-dev is already the newest version (3.0.2+dfsg-1.3ubuntu0.1).
The following packages were automatically installed and are no longer required:
bogofilter bogofilter-bdb bogofilter-common evolution-common
libchamplain-0.12-0 libchamplain-gtk-0.12-0 libcryptui0a libevolution
libgsl2 libjavascriptcoregtk-3.0-0 libmspack0 libpst4 libwebkitgtk-3.0-0
libwebkitgtk-3.0-common libytnef0 linux-headers-4.8.0-36
linux-headers-4.8.0-36-generic linux-image-4.8.0-36-generic
linux-image-extra-4.8.0-36-generic seahorse-daemon
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


So it was already installed? '0 Newly installed'?

DavidHart
Site Admin
Site Admin
Posts: 3615
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Configure question, Installing in Ubuntu 16.04

Postby DavidHart » Wed Mar 22, 2017 7:49 am

So it was already installed?

Yes: "libwxgtk3.0-dev is already the newest version (3.0.2+dfsg-1.3ubuntu0.1)"

If you open a terminal and do: wx-config --list
you should see it's available.


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 2 guests