Cant install WXWidgets in Ubuntu 16.06 - wxwidgets

cant install WXWidgets from source (wxwidgets3.0-3.0.2.orig)
After configure which apparently runs without errors:
config.status: executing wx-config commands
Configured wxWidgets 3.0.2 for `x86_64-unknown-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for GTK+ printing libnotify
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? yes
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg builtin
png sys
regex builtin
tiff builtin
zlib sys
expat sys
libmspack no
sdl no
at Make I get this after a few lines:
ranlib /home/sem/Downloads/wxwidgets3.0-3.0.2.orig/lib/libwxregexu-3.0.a
make: *** No rule to make target 'src/jpeg/jcomapi.c', needed by 'wxjpeg_jcomapi.o'. Stop.

I don't know what is wxwidgets3.0-3.0.2.orig, but this is not how the distribution archives are called, so it looks like you've got the file from which Ubuntu packages are built which doesn't seem to include the sources for 3rd party libraries such as libjpeg, presumably because these libraries are supposed to be already installed.
So you need to either install all the dependencies (you would find them in the debian/control file of the Ubuntu package) or get the really original sources from https://github.com/wxWidgets/wxWidgets/releases/v3.0.3 (there is no reason to use 3.0.2 when 3.0.3 is out).

Related

Unable to compile Qt5 examples. QCommandParser not found

I wanted to try out Qt5 with it's creator. I wanted to start with examples, so I installed some packages (with apt, also qtcreator package but issued the same with online-installer).
I am finally able to open examples, but those does not work.
I've tried to find every possible packages of qt in apt that may correspond to examples. Also tried to find package containing corresponding file (https://packages.ubuntu.com/search?searchon=contents&keywords=qcommandlineparser&mode=exactfilename&suite=disco&arch=any). It finds qtbase5-gles-dev, but I cannot install it since it wants me to uninstall a lot of software I need.
#include <QCommandLineParser>
#include <QCommandLineOption>
Both QCommandLineParser and Option are "file not found".
I'm on Kubuntu 19.04 and Qt Creator 4.8.1 based on Qt 5.12.2 (GCC 8.3.0, 64 bit)
According to this, I was running Qt kit as Qt4 not Qt5:
https://askubuntu.com/questions/916295/building-a-pro-in-qtcreator-gives-qtwidgets-no-such-file-or-directory
It is possible that the default qt build Kit has been set to qt 4.x rather than qt 5.x when qtcreator was installed. To update this;
qtcreator - options - build & run - Kits - Manual - Desktop (default)
- Qt version
Change Qt version from qt 4.x.. to qt 5.x.. in PATH (qt5).
Helped with delay...

Latest CMake and LLVM on Windows 10

All
latest LLVM is 7.0 and it is working quite well on Windows 10 x64, building native executables etc.
latest CMake is 3.12.x.
I have VS 2017 Pro installed as well.
Downloaded them both and tried to make simple project with it on Windows, and it didn't work, even if I set CC/CXX, linker pointing to lld, failing on compiling test problem, not finding rc (resource compiler).
Tried targeting GNU make as well as Ninja as build system.
Is this a supported configuration? If yes, how to make it work?
Basically, I would like to use CMake/LLVM with editor/terminal like I'm doing it on Linux
Run CMake from Developer Command Prompt.
That should make rc available in your PATH, and then CMake should be able to find it.

Linux or Windows version of a library in Cygwin?

I have developed some codes in Linux which use boost::serialization library. Now I want to copy my files into Cygwin and compile them to produce executable for Windows. I know that I should use Mingw-64 g++ compiler. But how about boost library? Should I download the Windows version or the Linux version of this library?
In Cygwin, you install Boost libraries as per Unix/Linux. From the documentation
Getting Started on Windows
A note to Cygwin and MinGW users
If you plan to use your tools from the Windows command prompt, you're in the right place.
If you plan to build from the Cygwin bash shell, you're actually running on a POSIX
platform and should follow the instructions for getting started on Unix variants.
Other command shells, such as MinGW's MSYS, are not supported—they may or may not work.

How to decide library install path on different linux systems?

Fedora have dynamic libs on /usr/lib64 and /usr/lib, for 64-bit and 32-bit libs separately; while 64-bit Debian install some 64-bit libraries on /usr/lib/x86_64-linux-gnu, but seems some 64-bit libs are still in /usr/lib.
This looks pretty messy. So when I write a cmake file for my project, how to decide the place for installing the compiled libs?
use GNUInstallDirs, it will do everything for you.

Ubuntu-compiled program to run on Unix webserver

I have compiled an Ada program on Ubuntu using GNAT.
Afterwards, I tried a few test runs with that program and it worked properly.
But when I uploaded this to my Apache (UNIX) webserver and tried to run the program, there was no output. Why is this so?
Could it be that programs which have been compiled on Ubuntu don't work on a UNIX server?
(Sorry for the stupid question!)
Linux version of the system I use for compiling (uname -a):
Linux ubuntu 3.0.0-12-generic #20-Ubuntu x86-64 GNU/Linux
Linux version of the system I want to run the program on later (uname -a):
Linux 2.6.37-he-xeon-64gb+1 i686 GNU/Linux
For compiling on the Ubuntu machine, I use:
gnatmake -O3 myprogram -bargs -static
When you build a GNAT program (gnatmake my_program), by default it links against dynamic libraries (libgnat.so, libgnarl.so). These libraries are part of the GNAT system and are very unlikely to be available on your web server.
If you say ldd my_program it will show you the shared libraries used.
You can force the build to use the static GNAT libraries by saying
gnatmake my_program -bargs -static
(the -bargs -static must come after regular flags like -O2).
Edit: more info on -bargs and friends.
You must make sure that the server has the libraries your app links against or link them statically like already suggested by others. Some other comments point out that you need to "cross compile" or that the server won't run 64 bit binaries. This is easily solved unless the app you're building is very complex.
gnatmake --GCC='gcc -m32'
Will make a binary that will run on a 32bit system. However the chief problem is that the servers (g)libc is very likely to be older than what's on your ubunu box. Programs compiled against newer glibc will not necessarily run on systems with an older glibc installed.
for more info and plenty more links, look here:
Linking against an old version of libc to provide greater application coverage
How can I link to a specific glibc version?
edit:
Besides, apache may not be configured to accept invocation of external binaries. Have you "tried to run the program" with something you know exists on the server? Try to run something trivial like /bin/ls to make sure your method of running the program works. Look at the logs if it doesn't work. Programs need to be executable, by the way: chmod 755 /path/to/webeserver/uploads/ada-app
Why don't you just compile it on your Webserver instead of your local machine ?
Aswell cat /etc/issue or cat /etc/release could give us some information about the distribution you're using.