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.
Related
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++
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.
Coming from a cushy Windows background, this building in linux is harder to understand, so apologies if this is an obvious question.
I have a c++ program that uses libcurl. It built fine on windows, but I must now port it to linux (specifically the raspberry pi). It uses the mime functions, so near-enough the latest version must be used. I've installed curl 7.62 by downloading it from https://curl.haxx.se/download.html and installing it as per the instructions at https://curl.haxx.se/docs/install.html to /home/pi/libraries/.
I have a dummy localhost web-server up for testing. When I call curl localhost from the terminal, I get: curl: (48) An unknown option was passed in to libcurl. When building and running my program I get an undefined symbol: curl_mime_init at run-time. After some googling, this appears to be a version mis-match and I confirmed this by checking versions:
Calling curl-config --version gives: libcurl 7.62.0, but calling curl --version gives: curl 7.62.0 (armv7l-unknown-linux-gnueabihf) libcurl/7.52.1 <other stuff>....
I assume that my program and curl are both looking else-ware for libcurl, but how can I specify the manually installed version of libcurl to g++, to my prog at run-time and to curl when calling from the terminal?
My program's makefile:
all: obj/curltests.o obj/Utility.o obj/curl_handler.o bin/curltests
obj/Utility.o: src/Utility.cpp src/Utility.h
g++ -g -c -pthread src/Utility.cpp -o obj/Utility.o
obj/curl_handler.o: src/curl_handler.cpp src/curl_handler.h
g++ -g -c -pthread src/curl_handler.cpp -o obj/curl_handler.o
obj/curltests.o: src/curltests.cpp
g++ -g -c -pthread src/curltests.cpp -o obj/curltests.o
bin/curltests: obj/curltests.o obj/Utility.o obj/curl_handler.o makefile
g++ -Wall -g \
-I src \
-L/home/pi/libraries/boost_1_68_0/stage/lib -lboost_system \
-lboost_filesystem -lboost_program_options -lboost_date_time \
obj/Utility.o obj/curltests.o obj/curl_handler.o \
-L/home/pi/libraries/curl-7.62.0/lib -lcurl \
-o bin/curltests
Not sure if this helps, but running whereis libcurl.so shows libcurl[.la][.so] in /usr/lib/ and libcurl[.a][.la][.so] in /usr/local/lib, but none in /home/pi/libraries/curl-7.62.0/lib as specified in the makefile above.
I tried installing APK Studio on my Ubuntu 15.04 machine but keep getting this error message:
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DAPP_REV_SHORT=\"0978cd4\" -DAPP_REV_LONG=\"0978cd4653fcfed5601d57b8e0f7cfade7f64d7a\" -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -o adb.o src/adb.cpp
In file included from ./include/adb.h:5:0,
from src/adb.cpp:1:
./include/process.h:4:30: fatal error: QRegularExpression: No such file or directory
#include <QRegularExpression>
^
compilation terminated.
Makefile:474: recipe for target 'adb.o' failed
make: *** [adb.o] Error 1.
How can I resolve this issue?
You are probably using an unsupported QT version, check your version with:
$ qmake -version
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu
Make sure you have GCC 4.6+, QT 5.2+
On Ubuntu, you can run:
$ sudo apt-get install qt5-qmake qt5-default libqt5opengl5-dev
$ qmake -version
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu
Running make again should build ApkStudio with no errors.
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.