Can't build wxPython 2.8.12.1 on CenOS 6 - linux

When trying to build, I get the following error.
I truncated all errors past not finding the include file.
What am I missing?
python setup.py build
WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
running build
running build_py
copying wx/__version__.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx
copying wx/build/build_options.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx/build
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
building '_stc' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.6 -c contrib/stc/gtk/stc_wrap.cpp -o build-gtk2.unicode/temp.linux-x86_64-2.6/contrib/stc/gtk/stc_wrap.o -pthread -O3 -pthread
contrib/stc/gtk/stc_wrap.cpp:2680:24: error: wx/stc/stc.h: No such file or directory

I found a good start to this here. http://wxpython.org/BUILD-2.8.html
I don't have a WXDIR variable. When I tried to run from the bld directory, it didn't work. So I tried again from the source directory. My configure line was much simpler.
./configure --with-gtk --enable-unicode
The key that I didn't understand before, was that if I wanted stc. I needed to compile and install it separately.
make
make -C contrib/src/stc
sudo make install
sudo make -C contrib/src/stc install
The author's .make file with
make $* \
&& make -C contrib/src/stc $*
works well too.
Remember to also run
sudo ldconfig
If you need other contrib stuff, look in the contrib/src directory for what is available.
Then cd to the wxPython directory. The standard
python setup.py build
python setup.py install
appear to work.
After all of this, I still needed to set my LD_LIBRARY_PATH to /usr/local/lib. I was then able run the application I was trying to install all along, which was ride, a GUI editor for robot-framework.

The point of this exercise was to wxPython 2.8.12.1 on CenOS 6. I could not find a workable binary to install. After I build the project, I found an acceptable place to get the binary. I wish that http://www.wxpython.org/ would point to this location as well. The Extra packages for Enterprise Linux (EPEL) has this project and others here: https://fedoraproject.org/wiki/EPEL .
An easy way to install them is to:
# yum install epel-release
# yum install wxPython
The first adds epel-release to your yum repository. The second installs wxPython. The binaries on the wxPython web site require a different gcc shared library. Using this repository ensures a match.

Related

Cannot install fastText because gcc 7.3.1 does not support C++11 on Amazon Linux

I need to install a system that uses fastText onto an Amazon Linux machine.
As practice, I have been trying to build fastText from source inside an Amazon Linux 2 docker image. I noticed gcc wasn't installed by default, so I installed it first. However, running the pip3 install . command inside the fastText directory gives me the following error, also shown in the screenshot below.
RuntimeError: unsupported compiler -- at least C++11 support is needed!
I tried to look for libraries that would give explicit C++11 support, even though gcc >= 4.8 already should, so I installed libcxx.x86_64 from the Fedora EPEL repository, but that did not help.
Neither this question which applies more to Ubuntu-based images nor this question which refers to a separate pip install (and thus may not give the specific version I need) have the answer I'm looking for.
Edited to add compiler params and error message before the traceback:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall \
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong \
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic \
-D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.7m \
-c /tmp/tmpi609eyh_.cpp -o tmp/tmpi609eyh_.o -std=c++11
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Should I be trying to install whatever package contains cc1plus?
Thanks to this answer from #Sourabh-Jain, I installed the gcc-c++ package and was able to move on in my setup process. Whoever comes across this in the future may not need to install both gcc and gcc-c++, but it is what I did. I'll edit this answer later if I manage to streamline the process.
Edit: the command that helped was
yum install gcc-c++

DBD-Oracle-1.76 installation issue

I am setting up a new server for POSTGRESQL, so we have to migrate from ORACLE to POSTGRES while installing DBD-Oracle-1.76 package. However, we are getting error even though we have exported ORACLE_BASE, ORACLE_HOME, LD_LIBRARY, LD_LIBRARY_PATH.
Here is what I have tried:
make
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/optware/oracle/12.2.0.1/client_1/lib -lclntsh -ldl -lm -lpthread -lnsl -lirc -limf -lirc -lrt -laio -lresolv -lsvml \
Here is the error:
/bin/ld: cannot find -laio
collect2: error: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Oracle/Oracle.so] Error 1
Any ideas? Any help would be greatly appreciated!
If you're on Redhat/Fedora/RHEL/CentOS then try this before make:
sudo yum install libaio-devel
If Ubuntu (or Debian?) try:
sudo apt install libaio-dev
...or sudo apt-get install libaio libaio1 libaio-dev
I also needed:
export ORACLE_HOME=/wherever/oracle18-instantclient/instantclient_18_5
export LD_LIBRARY_PATH="$ORACLE_HOME:/usr/lib/x86_64-linux-gnu/"
Error while installing DBD::Oracle might be helpful.

unable to install Nodejs on centos-fatal error: headers: No such file or directory

I am trying to install nodejs from source. When I run 'make install' I am getting:
node-v6.3.1]# make install
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/centos/node-v6.3.1/out'
g++ -I../deps/gtest -I../deps/gtest/include -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-missing-field-initializers -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /home/centos/node-v6.3.1/out/Release/.deps//home/centos/node-v6.3.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o.d.raw -c -o /home/centos/node-v6.3.1/out/Release/obj.target/gtest/deps/gtest/src/gtest-death-test.o ../deps/gtest/src/gtest-death-test.cc
In file included from ../deps/gtest/include/gtest/internal/gtest-internal.h:40:0,
from ../deps/gtest/include/gtest/internal/gtest-death-test-internal.h:40,
from ../deps/gtest/include/gtest/gtest-death-test.h:41,
from ../deps/gtest/src/gtest-death-test.cc:34:
../deps/gtest/include/gtest/internal/gtest-port.h:259:41: fatal error: ctype.h: No such file or directory
#include <ctype.h> // for isspace, etc
I installed c and c++ libraries as well using: yum -y install gcc gcc-c++ make.
I also tried to install via rpm:
error: %pre(nodejs-1:6.3.1-1nodesource.el7.centos.x86_64) scriptlet failed, exit status 127
Error in PREIN scriptlet in rpm package 1:nodejs-6.3.1-1nodesource.el7.centos.x8 6_64
Verifying : 1:nodejs-6.3.1-1nodesource.el7.centos.x86_64 1/1
Failed:
nodejs.x86_64 1:6.3.1-1nodesource.el7.centos
Could you please anyone help what might be the issue. Thanks

mod_wsgi | linux installation error

I'm getting the following error when I try to install mod_wsgi
./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking Apache version... 2.2.3
configure: creating ./config.status
config.status: creating Makefile
make
/usr/sbin/apxs -c -I/usr/local/include/python2.6 -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
sh: /apr-1/build/libtool: No such file or directory
apxs:Error: Command failed with rc=8323072
.
make: *** [mod_wsgi.la] Error 1
libtool is installed on my system..
mod_wsgi 3.2
****Apache 2.2****
****Python 2.6****
You're possibly missing apr development files. Depending on your distribution check your package manager for 'apr'. On ubuntu it might be 'libaprutil1-dev'.

Building OpenSSH on Cygwin

I'm trying to build OpenSSH 5.1 on Cygwin. I'm using the following configure command:
./configure --prefix=/usr --sysconfdir=/etc --libexecdir='${sbindir}' \
--localstatedir=/var --datadir='${prefix}/share' --mandir='${datadir}/man' \
--infodir='${datadir}/info'
The configure command runs OK, but when I try to make I get this error:
gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -fno-builtin-memset -I. -I.. -I. -
.. -DHAVE_CONFIG_H -c bsd-arc4random.c
In file included from ../openbsd-compat/openbsd-compat.h:45,
from ../includes.h:169,
from bsd-arc4random.c:17:
../openbsd-compat/getrrsetbyname.h:57:26: arpa/nameser.h: No such file or directory
../openbsd-compat/getrrsetbyname.h:59:20: resolv.h: No such file or directory
I'm a bit stuck. Anyone got any ideas.
The particular problem in this build was that the Cygwin system didn't have the minires package installed. You should have first installed minires (1.02 or smth) which installs the necessary arpa/nameser*.h and resolv.h files in the appropriate places (/usr/local/include or /usr/include).
Openssh is available in Cygwin. Just use that.

Resources