Author Topic: cannot find wx-config when ./configure  (Read 10059 times)

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
cannot find wx-config when ./configure
« on: June 13, 2016, 04:20:19 am »
I followed the wiki to install codeblocks, the URL of which is:
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Linux

I use Ubuntu 10.04, the kernel is 2.6.32-21. I'd like to install codeblocks 13.12
I've install the wxWidget 2.8.12 successfully, also modefied the PATH and ls.so.conf. And I excuted wx-config --xx,it can also give right result.

But when I excuted ./configure in codesblocks' folder, the error occured:

checking for wx-config... no
configure: error:
                wxWidgets must be installed on your system.

                Please check that wx-config is in path, the directory
                where wxWidgets libraries are installed (returned by
                'wx-config --libs' or 'wx-config --static --libs' command)
                is in LD_LIBRARY_PATH or equivalent variable and
                wxWindows version is 2.8.0 or above.

How can I fix it ?

Thank you very much !

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cannot find wx-config when ./configure
« Reply #1 on: June 13, 2016, 09:03:51 am »
Isn't there a ready made package for this distro?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: cannot find wx-config when ./configure
« Reply #2 on: June 13, 2016, 10:24:32 am »
I have only found the 16.01 for ubuntu 14.04 and above. It seems that there is no 13.12 for ubuntu 10.04.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: cannot find wx-config when ./configure
« Reply #3 on: June 13, 2016, 03:31:22 pm »
Did you do the CB Bootstrap command?

And, please post the output of the wx-config --list command?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: cannot find wx-config when ./configure
« Reply #4 on: June 14, 2016, 03:40:49 am »
Oh, I've found something strange.
I installed the wxWidget in my user(which is "luxr"), and when I excute wx-config, it can be found. like this:

luxr@zhuwh-desktop:~/Desktop/codeblocks-13.12$ wx-config --libs
-L/opt/wx/2.8/lib -pthread   -lwx_gtk2u-2.8

However, when I excute wx-config in root, it can't be found!

root@zhuwh-desktop:~/Desktop/codeblocks-13.12# wx-config --libs
The program 'wx-config' can be found in the following packages:
 * libwxbase2.6-dbg
 * libwxbase2.6-dev
 * libwxbase2.8-dbg
 * libwxbase2.8-dev
 * libwxgtk2.6-dbg
 * libwxgtk2.6-dev
 * libwxgtk2.8-dbg
 * libwxgtk2.8-dev
Try: apt-get install <selected package>

Maybe that's why I cannot do ./configure, because I have to use the "sudo" command. Is there any mathod to solve the problem?

Next is the output of ./bootstrap:
root@zhuwh-desktop:~/Desktop/codeblocks-13.12# ./bootstrap
Found revision: '0' ''
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cannot find wx-config when ./configure
« Reply #5 on: June 14, 2016, 08:55:19 am »
You don't have to use sudo for configure only for "make install" and this is if you don't change the prefix (--prefix parameter on the configure script).

About the wx-config, I guess the folder where wx-config is placed is in the PATH variable of your use and not in the path variable of the root user.
Why don't you install a system libwxgtk2.8 and libwxgtk2.8-dev using apt-get?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: cannot find wx-config when ./configure
« Reply #6 on: June 14, 2016, 10:52:05 am »
Oh, yes,  Thank you very much.

it is because of the PATH. What confused me is that "/etc/profile" has no effect on root! I must do "source" manually and then root can find wx-config, and ./configure can work.  Or I should add the path to "/root/.bashrc".

If I don't use sudo for configure, it will give an error, which is "permission denied".

Because I use some early version of ubuntu 10.04, there is only CB v8.02  and wxWidget v2.8.0 in Synaptic Package Manage. While I'd like to install CB v13.12 and the source files downloaded from SourceForge need wxWidget V2.8.12,  so I have to install the wxWidget by myself. Although the wiki says all version above 2.8.0 are OK (except 2.8.3), in fact configure will output errors if the version is under 2.8.12.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: cannot find wx-config when ./configure
« Reply #7 on: June 14, 2016, 11:45:23 am »
I would recommend a newer version than 13.12...you can use 16.01 or even the svn trunk. they are all stable enough if you use wx2.8

Quote
If I don't use sudo for configure, it will give an error, which is "permission denied".
this should not be the case...For what do you don't have the permission?

greetings

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: cannot find wx-config when ./configure
« Reply #8 on: June 14, 2016, 12:46:50 pm »
I would recommend a newer version than 13.12...you can use 16.01 or even the svn trunk. they are all stable enough if you use wx2.8

Quote
If I don't use sudo for configure, it will give an error, which is "permission denied".
this should not be the case...For what do you don't have the permission?

greetings

This happens when you once have run it with root-rights.
"chown <yourusername>.<yourgroup> -R <path/to/sources>" should fix this.

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: cannot find wx-config when ./configure
« Reply #9 on: June 14, 2016, 04:15:14 pm »
I would recommend a newer version than 13.12...you can use 16.01 or even the svn trunk. they are all stable enough if you use wx2.8

Thank you, I will try 16.01. In fact I have use 10.05 for a long time. But sometimes it would crashed and would be slower and slower when debugging, so I want to use a newer version.

Offline lxr5109

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: cannot find wx-config when ./configure
« Reply #10 on: June 14, 2016, 04:18:15 pm »
This happens when you once have run it with root-rights.
"chown <yourusername>.<yourgroup> -R <path/to/sources>" should fix this.

Thank you. It is what you said. Some files like "configure" is belong to root other than me. Thank you.