Sunday, 18 August 2019

Unix programming part 3

I learned something when researching terminal programming in unix-style operating systems. In order to run something when you are in that directory you need to use ./ prefix in front of the command. So for example wx-config needs to be called ./wx-config.

However this did not solve the problem I had with ./bootstrap not working. After some messages in wxWidgets forum it turns out I have to 'sudo make install' wxWidgets which is against the guideline in installation. If you run 'make' only it's enough for the library and you can compile and run examples. But this is not enough for Code::Blocks which requires 'make install'. This 'install' is something "more" thorough way to install the library, but it's not recommended if you work with several versions of the same library, I guess, because it's copying files under usr (system libraries).

Code::Blocks developers both failed to tell this in their forum and also they don't tell it in install docs to specifically override wxWidgets guideline and use 'make install'. If they had done this there would be way less confusion. I have to say that readme texts for installations are quite bad in both C::B and wxWidgets library, but wx is far better. It serves no purpose to be "elitist" and write vague, hard to understand documents for the program, library etc. and assume that people are experts in unix-style programming.

After all this frustration and being harassed at Code::Blocks forums I finally was able to run ./bootstrap. After that I ran ./configure --with-contrib-plugins=all for Code::Blocks and guess what? It didn't work. Great. I guess this is unix-programming. The error I get is:

configure: error: Package requirements (hunspell) were not met:

No package 'hunspell' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables HUNSPELL_CFLAGS
and HUNSPELL_LIBS to avoid the need to call pkg-config.


Of course I have no idea what that error is. What is package hunspell? Why it's missing from the actual source code package?

2 comments:

David said...

Maybe that's what they mean by "batteries not included".

http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_Where_are_the_libraries_for_the_OpenGL.2C_Ogre3D.2C_SDL.2C_QT.2C_wxWidgets_etc._projects.3F

This is the project page for hunspell:

https://github.com/hunspell/hunspell

I'm not a Mac guy, but you might just be able to say "brew install hunspell".

Krice said...

Yes, figured that out. Homebrew seems to be the thing to try when in doubt.