Not able to compile LibXML in 64 bit HPUX - perl

We were trying to compile the LibXML module for perl in 64 bit HPUX machine.
We ran the .configure like below:
./configure --prefix=/software/opt/HPUX11/ia64/libxml2-2.7.7 --target=ia64-hpux
The compiler is set to 64 bit: export CC="cc +DD64"
Then we ran gmake install, the following error occured:
gmake[1]: Entering directory `/software/src/libxml2-2.7.7'
/bin/sh ./libtool --tag=CC --mode=link cc +DD64 -o xmllint xmllint.o ./libxml2.la -lpthread -lm
libtool: link: cc +DD64 -o .libs/xmllint xmllint.o ./.libs/libxml2.so -lpthread -lm -Wl,+b -Wl,/software/opt/HPUX11/ia64/libxml2-2.7.7/lib
ld: Unknown input file type: "./.libs/libxml2.so"
Fatal error.
gmake[1]: *** [xmllint] Error 1
gmake[1]: Leaving directory `/software/src/libxml2-2.7.7'
gmake: *** [install-recursive] Error 1
Could somebody tell us how to fix this?

Related

Compiling perl Net::Interface module on CentOS 8.1 fails

I download the sources and manually tried to compile the perl Net::Interface module. Using CPAN to install the module gives the same error.
wget http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/Net-Interface-1.016.tar.gz
tar xvfz Net-Interface-1.016.tar.gz
cd Net-Interface-1.016
perl Makefile.PL
Now this fails with the below error
checking for getnameinfo... yes
checking whether byte ordering is bigendian... no
checking for uint8_t... yes
checking size of uint8_t... configure: error: cannot compute sizeof (uint8_t)
See `config.log' for more details.
could not open config.h
config.log shows the below error
configure:10128: result: yes
configure:10135: checking size of uint8_t
configure:10437: gcc -o conftest -g -O2 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib conftest.c >&5
/usr/bin/ld: /tmp/ccXH6miX.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
configure:10440: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
How can I fix this error? config.log seems to suggest to pass "-fPIC" flag but I am not sure how?
Thanks.
/usr/bin/ld: /tmp/ccXH6miX.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
The configure script needs to be run with --enable-shared for some reason (it is not necessary on Ubuntu). The following worked for me in a docker container with CentOS 8:
./configure --enable-shared
perl -I. Makefile.PL
make
sudo make install

Boost.Python Link Error with Python3 and virtualenv

I got the following error when I tried to compile .cpp file with clang++.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I set up Python and boost-python as follows.
Python
I installed Python 3.6.0 using pyenv-virtualenv (via homebrew)
Boost-Python
I used homebrew in Python 3 environment.
$ source activate py36
$ brew install boost-python --with-python3 --without-python
~/.bash_profile
My ~/.bash_profile looks like this:
export PYENV_ROOT="/usr/local/var/pyenv"
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/local/var/pyenv/versions/3.6.0/include/python3.6m/"
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)" ; fi
Test cpp
This is the file I tried to compile and failed (saved as test.cpp).
#define BOOST_PYTHON_STATIC_LIB
#include <boost/python.hpp>
using namespace boost::python;
char const* say(){
return "hello, world";
}
BOOST_PYTHON_MODULE( hello ){
boost::python::def( "say", say );
}
makefile
CC = clang++
INCLUDE = -I`python -c 'from distutils.sysconfig import *; print(get_python_inc())’`
BOOST = -lboost_python3.6 -lboost_serialization
FMATH = -fomit-frame-pointer -fno-operator-names -msse2 -mfpmath=sse -march=native
CFLAGS = -std=c++11 -L/usr/local/lib -O3
CFLAGS_SO = -shared -fPIC -std=c++11 -L/usr/local/lib -O3
LINK = -L/usr/local/Cellar/boost-python/1.64.0/lib/
install:
$(CC) test.cpp -o hello.so $(INCLUDE) $(BOOST) $(LINK) $(FMATH) $(CFLAGS_SO)
Error
make install returns this error.
clang++ test.cpp -o hello.so -I`python -c 'from distutils.sysconfig import *; print(get_python_inc())’` -lboost_python3.6 -lboost_serialization -L/usr/local/Cellar/boost-python/1.64.0/lib/ -fomit-frame-pointer -fno-operator-names -msse2 -mfpmath=sse -march=native -shared -fPIC -std=c++11 -L/usr/local/lib -O3 -v
/bin/sh: command substitution: line 0: unexpected EOF while looking for matching `''
/bin/sh: command substitution: line 1: syntax error: unexpected end of file
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang -cc1 version 8.1.0 (clang-802.0.42) default target x86_64-apple-darwin16.6.0
ignoring nonexistent directory "-lboost_python3.6"
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
.
/usr/local/var/pyenv/versions/3.6.0/include/python3.6m
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -dylib -arch x86_64 -macosx_version_min 10.12.0 -o hello.so -L/usr/local/Cellar/boost-python/1.64.0/lib/ -L/usr/local/lib /var/folders/rm/qv81g4ss29j_gv1b366rl2080000gp/T/test-16790a.o -lboost_serialization -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
<LINES ARE OMITTED>
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [install] Error 1

Installing Neovim through Linuxbrew on AWS

I'm trying to install neovim with linuxbrew on AWS, but I keep getting the following messages, and I can't figure it out :/.
/home/ec2-user/.linuxbrew/bin/libtool: line 10548: /usr/bin/gcc-4.8: No such file or directory
~/dotfiles$ brew install neovim
==> Installing neovim from neovim/neovim
==> Downloading https://github.com/neovim/neovim/archive/v0.1.4.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim-0.1.4.tar.gz
==> Downloading https://github.com/libuv/libuv/archive/v1.8.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libuv-1.8.0.tar.gz
==> Downloading https://github.com/msgpack/msgpack-c/archive/cpp-1.0.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--msgpack-1.0.0.tar.gz
==> Downloading https://raw.githubusercontent.com/neovim/deps/master/opt/LuaJIT-2.0.4.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--luajit-2.0.4.tar.gz
==> Downloading https://github.com/keplerproject/luarocks/archive/5d8a16526573b36d5b22aa74866120c998466697.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--luarocks-998466697.tar.gz
==> Downloading https://github.com/mauke/unibilium/archive/v1.2.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--unibilium-1.2.0.tar.gz
==> Downloading http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libtermkey-0.18.tar.gz
==> Downloading https://github.com/neovim/libvterm/archive/1b745d29d45623aa8d22a7b9288c7b0e331c7088.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libvterm-7088.tar.gz
==> Downloading https://github.com/jemalloc/jemalloc/releases/download/4.0.2/jemalloc-4.0.2.tar.bz2
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--jemalloc-4.0.2.tar.bz2
==> Building third-party dependencies.
==> cmake ../third-party -DUSE_BUNDLED_BUSTED=OFF -DUSE_BUNDLED_LUV=OFF -DUSE_EXISTING_SRC_DIR=ON -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/home/ec2-user/
==> make VERBOSE=1
Last 15 lines from /home/ec2-user/.cache/Homebrew/Logs/neovim/02.make:
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -Wall -std=c99 -fPIC -c uninames.c -fPIC -DPIC -o .libs/uninames.o
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -Wall -std=c99 -fPIC -c uninames.c -o uninames.o >/dev/null 2>&1
libtool --mode=compile --tag=CC /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS='"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo"' -Wall -std=c99 -fPIC -o uniutil.lo -c uniutil.c
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS=\"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo\" -Wall -std=c99 -fPIC -c uniutil.c -fPIC -DPIC -o .libs/uniutil.o
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS=\"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo\" -Wall -std=c99 -fPIC -c uniutil.c -o uniutil.o >/dev/null 2>&1
libtool --mode=link --tag=CC /home/ec2-user/.linuxbrew/bin/gcc-5 -L/home/ec2-user/.linuxbrew/lib -Wl,--dynamic-linker=/home/ec2-user/.linuxbrew/lib/ld.so -Wl,-rpath,/home/ec2-user/.linuxbrew/lib -rpath '/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build/usr/lib' -version-info 3:0:3 -o libunibilium.la unibilium.lo uninames.lo uniutil.lo
libtool: link: /usr/bin/gcc-4.8 -shared -fPIC -DPIC .libs/unibilium.o .libs/uninames.o .libs/uniutil.o -L/home/ec2-user/.linuxbrew/lib -Wl,--dynamic-linker=/home/ec2-user/.linuxbrew/lib/ld.so -Wl,-rpath -Wl,/home/ec2-user/.linuxbrew/lib -Wl,-soname -Wl,libunibilium.so.0 -o .libs/libunibilium.so.0.3.0
/home/ec2-user/.linuxbrew/bin/libtool: line 10548: /usr/bin/gcc-4.8: No such file or directory
make[3]: *** [libunibilium.la] Error 127
make[3]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build/build/src/unibilium'
make[2]: *** [build/src/unibilium-stamp/unibilium-build] Error 2
make[2]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build'
make[1]: *** [CMakeFiles/unibilium.dir/all] Error 2
make[1]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build'
make: *** [all] Error 2
READ THIS: https://github.com/Linuxbrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/neovim/homebrew-neovim/issues
These open issues may also help:
Neovim Fails to Install on Standalone Linuxbrew: libmsgpack.so Error https://github.com/neovim/homebrew-neovim/issues/156
Neovim failing to build with homebrew on OS X 10.9.5 https://github.com/neovim/homebrew-neovim/issues/153
Can't install via homebrew-neovim if luarocks path is set explicitly https://github.com/neovim/homebrew-neovim/issues/149
Error when trying to install neovim in my Ubuntu 14.04 virtual machine. https://github.com/neovim/homebrew-neovim/issues/134
I had the same issue. It is a problem of the libtool formula
https://github.com/Linuxbrew/homebrew-core/issues/376
I fixed by doing
brew update
brew reinstall -s libtool
brew install neovim/neovim/neovim

unable to build binutils for my cross compiler

i am trying to build binutils 2.19.1 with mingw/msys using following commands:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
and im getting following errors:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'. Stop.
make: *** No rule to make target `install-gcc'. Stop.
i am getting the same error even for the diff binutils version,i have tried binutils-2.19.1, 2.22.0, 2.23.1
so what can be the problem ??
also my mingw's gcc compiler version is 4.6.2
i've also tried the command
make CFLAGS="-Os -w"
bt still the same problem persists
I'm getting a similar error ("cygpath: command not found"), but with newer versions. FWICT there is a line within binutils that assumes that Cygwin is present, although I didn't see any notes in the build instructions saying that Cygwin was required (I might have missed it, though).
I suppose the correct approach would be to install Cygwin, but I'm not sure if that will interfere with Mingw in other ways. It looks like binutils is just trying to use cygpath to convert between O/S path naming conventions, so I got around this problem by creating a little dummy cygpath shell script:
#options described at http://cygwin-lite.sourceforge.net/html/cygpath.html
#echo "MISSING CYGPATH"
if [ "x$1" == "x-w" ]
then
echo $2 #just echo path name back as-is
else
read -p "MISSING CYGPATH. PARAMS WERE: 1=$1 2=$2 3=$3 4=$4 5=$5"
fi
I placed this on the PATH so binutils could find it, instead of getting an error during the build. This script just echoes the path name back as-is (for the path renaming scenario), since Windows seems to be able to understand Unix-style paths anyways these days (and I was running on Windows). For anything else, this script will pause and display the first few command line parameters, to provide some hints as to what further functionality is needed.
HTH someone get a little farther

How do I fix "gcc: winrespp.rc: No such file or directory" during compiling PAR::Packer on Cygwin?

I have tried to install PAR::Packer in Cygwin for Windows on a 32 bit machine, so I executed cpan pp.
I am facing the following problem.
gcc-4 -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE -DPARL_EXE=\parl.exe\ -O3 main.c windres -F pei-i386 -i winres\pp.rc -o winres\pp.res
gcc: winrespp.rc: No such file or directory
gcc: warning: '-x c' after last input file has no effect
gcc: no input files
windres: preprocessing failed.
Makefile:735: recipe for target ppresource.coff failed
make[1]: *** [ppresource.coff] Error 1
make[1]: Leaving directory /home/prabhakaran.srinivas/.cpan/build/PAR-Packer-1.013-eTAwxL/myldr
Makefile:594: recipe for target subdirs failed
make: *** [subdirs] Error 2
RSCHUPP/PAR-Packer-1.013.tar.gz
make -- NOT OK
CPAN: YAML loaded ok (v0.81)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
The problem is in myldr/Makefile.PL:
$pre_res = qq(winres\\pp.res);
$rt_cmd = qq(windres -F pei-i386 -i winres\\pp.rc -o $pre_res);
$res_cmd = qq(windres -o ppresource.coff $pre_res);
$res_section = $res;
and, later,
$res_section:
$rt_cmd
$res_cmd
Under Cygwin's bash, winres\pp.rc would be interpreted as winrespp.rc instead of winres/pp.rc. The correct way would be
$pre_res = catfile(winres => 'pp.res');
$rt_cmd = join ' ' => qw(windres -F pei-i386 -i), catfile(winres => 'pp.rc'), '-o', $pre_res;
etc.