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

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.

Related

Libtool - Mismatch version

I try to install USBIP on Centos 5.11 (Kernel 2.6.18-409.el5) but I always have this error when I type "make" :
make[1]: Entering directory "/root/Downloads/usbip-0.1.7/src"
Making all in lib
make[2]: Entering directory "/root/Downloads/usbip-0.1.7/src/lib"
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -W -Wstrict-prototypes -std=gnu99 -DUSBIDS_FILE='"/usr/local/share/usbip/usb.ids"' -g -O2 -MT libusbip_la-names.lo -MD -MP -MF ".deps/libusbip_la-names.Tpo" -c -o libusbip_la-names.lo "test -f "names.c" || echo './'"names.c; \
then mv -f ".deps/libusbip_la-names.Tpo" ".deps/libusbip_la-names.Plo"; else rm -f ".deps/libusbip_la-names.Tpo"; exit 1; fi
libtool: Version mismatch error. This is libtool 1.9b, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 1.9b
libtool: and run autoconf again.
make[2]: [libusbip_la-names.lo] Error 1
make[2]: Leaving directory "/root/Downloads/usbip-0.1.7/src/lib"
make[1]: [all-recursive] Error 1
make[1]: Leaving directory "/root/Downloads/usbip-0.1.7/src"
make: *** [all] Error 2
I saw several solution on forums, like "autoreconf -vfi" but it does not work for me.
I currently try to reinstall libtool to have the last version but I can't. When I type "yum remove libtool", I'm always able to type "libtool --version" :
[tuk#VM01 Downloads]# libtool --version
ltmain.sh (GNU libtool) 1.9b
Written by Gordon Matzigkeit <gord#gnu.ai.mit.edu>, 1996
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And binaries are always here :
[tuk#VM01 Downloads]# find / -name "libtool*"
/opt/share/man/man1/libtoolize.1
/opt/share/man/man1/libtool.1
/opt/share/aclocal/libtool.m4
/opt/share/info/libtool.info-1
/opt/share/info/libtool.info-2
/opt/share/info/libtool.info
/opt/share/libtool
/opt/bin/libtool
/opt/bin/libtoolize
/usr/local/share/man/man1/libtoolize.1
/usr/local/share/man/man1/libtool.1
/usr/local/share/aclocal/libtool.m4
/usr/local/share/info/libtool.info-1
/usr/local/share/info/libtool.info-2
/usr/local/share/info/libtool.info
/usr/local/share/libtool
/usr/local/bin/libtool
/usr/local/bin/libtoolize
/usr/share/automake-1.9/am/libtool.am
Is there any solution fro me to install USBIP ? Thanks you
Solved !
I haved several binaries for libtool :
[root#SVSLOFLEX2 ~]# which -a libtool
/usr/local/bin/libtool
/usr/bin/libtool
The version of /usr/local/bin is the 1.9b (and it don't work)
I added this line to use another version of libtool (by default) :
export PATH=/usr/bin:$PATH
The version of /usr/bin is the 1.5.22, and it work, USBIP is now installed.

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

Installing Event::Lib in CitrusPerl install on Mac OS X 10.7

I'm working on a Perl project that requires Event::Lib. I'm on MacOS 10.7, and am running Citrus Perl instead of the system Perl. I installed libevent from source and it compiled fine. But, when I go to install Event::Lib, I run into some errors:
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
Does anyone have any ideas on what to try next?
EDIT: After attempting some 'o conf' options:
cpan[1]> o conf makepl_arg "INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent"
makepl_arg [INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent]
Your /Users/username/code/CitrusPerl/vendor/lib/CPAN/Config.pm file
is not writable. I will attempt to write your configuration to
/Users/username/.cpan/CPAN/MyConfig.pm instead.
Old configuration file /Users/username/.cpan/CPAN/MyConfig.pm
moved to /Users/username/.cpan/CPAN/MyConfig.pm.bak
commit: wrote '/Users/username/.cpan/CPAN/MyConfig.pm'
cpan[2]> install Event::Lib
Reading '/Users/username/code/CitrusPerl/cpan/Metadata'
Database was generated on Thu, 07 Feb 2013 21:53:02 GMT
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/02packages.details.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Thu, 14 Feb 2013 15:41:03 GMT
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/03modlist.data.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Writing /Users/username/code/CitrusPerl/cpan/Metadata
Running install for module 'Event::Lib'
Running make for V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Fetching with LWP:
http://www.perl.org/CPAN/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checksum for /Users/username/code/CitrusPerl/cpan/sources/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz ok
Scanning cache /Users/username/code/CitrusPerl/cpan/build for sizes
............................................................................DONE
CPAN.pm: Building V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checking existance of libevent...ld: warning: directory not found for option '-L/sw/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
yes
Checking capabilities...
event_set_log_callback...no
event_priority_init...no
Additional defines:
Checking if your kit is complete...
Looks good
Writing Makefile for Event::Lib
Writing MYMETA.yml and MYMETA.json
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
VPARSEVAL/Event-Lib-1.03.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
VPARSEVAL/Event-Lib-1.03.tar.gz : make NO
I was able to get this to work in about 10 minutes time.
Use Perlbrew
Use Homebrew
Then:
brew install libevent
perlbrew install perl-5.16.0
perlbrew switch perl-5.16.0
perl -MCPAN -e 'install Event::Lib'
I think the above are the best utilities to provide a proper development environment that you can switch up; IE you can switch Perl versions of the fly. Additionally they wont impact your native system. Anyways if you decide not to use the aforementioned, your particular error looks to be about a missing header file. I would assert that the libevent headers are indeed in /usr/local/include.
Good luck.

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

Not able to compile LibXML in 64 bit HPUX

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?