having issues with installing perl modules :: Make had returned bad status, install seems impossible - apache

good day - i am still having issues with installing perl modules
there seems to be issues with the make-file. i am trying to figure out what goes wrong here on my notebook.
cpan[1]> install Data::Dumper
Running install for module 'Data::Dumper'
Running make for S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Fetching with LWP:
http://mirrors.hostingromania.ro/cpan.org/authors/id/S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Fetching with LWP:
http://mirrors.hostingromania.ro/cpan.org/authors/id/S/SM/SMUELLER/CHECKSUMS
Checksum for /home/martin/.cpan/sources/authors/id/S/SM/SMUELLER/Data-Dumper-2.161.tar.gz ok
CPAN.pm: Building S/SM/SMUELLER/Data-Dumper-2.161.tar.gz
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Data::Dumper
Writing MYMETA.yml and MYMETA.json
cp Dumper.pm blib/lib/Data/Dumper.pm
Running Mkbootstrap for Dumper ()
chmod 644 "Dumper.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Dumper.bs blib/arch/auto/Data/Dumper/Dumper.bs 644
"/usr/bin/perl" "/usr/lib/perl5/5.18.2/ExtUtils/xsubpp" -typemap '/usr/lib/perl5/5.18.2/ExtUtils/typemap' Dumper.xs > Dumper.xsc
mv Dumper.xsc Dumper.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -DVERSION=\"2.161\" -DXS_VERSION=\"2.161\" -fPIC "-I/usr/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE" -DUSE_PPPORT_H Dumper.c
/bin/sh: cc: Kommando nicht gefunden.
Makefile:332: recipe for target 'Dumper.o' failed
make: *** [Dumper.o] Error 127
SMUELLER/Data-Dumper-2.161.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:
SMUELLER/Data-Dumper-2.161.tar.gz : make NO
cpan[2]>
well - i need to make sure that the make is set propperly ..good day - i am still having issues with installing perl modules
there seems to be issues with the make-file. i am trying to figure out what goes wrong here on my notebook.

A C compiler is required to build that module, but the C compiler which perl was built with, 'cc' isn''t available. You will need to install that first.
But Data::Dumper is part of the standard perl distribution, so you shouldn't need to install it anyway. If you're using a Linux distribution where the perl installation has been split into multiple packages, then you may just need to do something like
yum install perl-Data-Dumper

Related

Missing asn1.h on httpd build from source

i have been trying to build httpd-2.4.43 from source and i included OpenSSL-fips-2.0.16.
However, i encountered an error during build process of httpd. see below;
make[2]: Entering directory `/root/httpd/httpd-2.4.43/support'
/root/httpd/httpd-2.4.43/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -I/opt/openssl-fips-2.0.16/include -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE \
-I. -I/root/httpd/httpd-2.4.43/os/unix -I/root/httpd/httpd-2.4.43/include -I/root/httpd/httpd-2.4.43/srclib/apr/include -I/root/httpd/httpd-2.4.43/srclib/apr-util/include -I/usr/local/include -I/root/httpd/httpd-2.4.43/modules/aaa -I/root/httpd/httpd-2.4.43/modules/cache -I/root/httpd/httpd-2.4.43/modules/core -I/root/httpd/httpd-2.4.43/modules/database -I/root/httpd/httpd-2.4.43/modules/filters -I/root/httpd/httpd-2.4.43/modules/ldap -I/root/httpd/httpd-2.4.43/server -I/root/httpd/httpd-2.4.43/modules/loggers -I/root/httpd/httpd-2.4.43/modules/lua -I/root/httpd/httpd-2.4.43/modules/proxy -I/root/httpd/httpd-2.4.43/modules/http2 -I/root/httpd/httpd-2.4.43/modules/session -I/root/httpd/httpd-2.4.43/modules/ssl -I/root/httpd/httpd-2.4.43/modules/test -I/root/httpd/httpd-2.4.43/server -I/root/httpd/httpd-2.4.43/modules/md -I/root/httpd/httpd-2.4.43/modules/arch/unix -I/root/httpd/httpd-2.4.43/modules/dav/main -I/root/httpd/httpd-2.4.43/modules/generators -I/root/httpd/httpd-2.4.43/modules/mappers -prefer-non-pic -static -c ab.c && touch ab.lo
In file included from ab.c:161:0:
/opt/openssl-fips-2.0.16/include/openssl/rsa.h:62:26: fatal error: openssl/asn1.h: No such file or directory
#include <openssl/asn1.h>
^
compilation terminated.
make[2]: *** [ab.lo] Error 1
Above error message points to missing asn1.h.
I do not know where to find it. Maybe there is a missing procedure on building OpenSSL from source?
I feel i miss something when building OpenSSL from source.
Please do point me to the right direction for this.
Fixed it. Apprently, when i search for resources, i was finding the asn1.h problem not knowing that rsa.h part which includes asn1.h.
So it was found out that this was due to the *ssl-devel dependencies while building openssl.
So please install the *ssl-devel in your build envionrment
openssl-devel for RHEL/Fedora
libssl-devel for Debian
Then rebuild OpenSSL then httpd
You have to install OpenSSL development package, which is available in standard repositories of all modern Linux distributions.
Install OpenSSL development package on Debian, Ubuntu or their derivatives:
sudo apt-get install libssl-dev
To install OpenSSL development package on Fedora, CentOS or RHEL:
sudo yum install openssl-devel

Redis build failure

I'm attempting to build redis on my aws linux server in order to get access to the redis-cli and connect to my redis instance which is also running successfully in aws.
my gcc is:
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
I downloaded the source and started the build:
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make distclean
make
It built the dependencies and then gave me this:
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/tsd.o src/tsd.c
gcc -std=gnu99 -Wall -pipe -g3 -O3 -funroll-loops -c -D_GNU_SOURCE -D_REENTRANT -Iinclude -Iinclude -o src/witness.o src/witness.c
ar crus lib/libjemalloc.a src/jemalloc.o src/arena.o src/background_thread.o src/base.o src/bin.o src/bitmap.o src/ckh.o src/ctl.o src/div.o src/extent.o src/extent_dss.o src/extent_mmap.o src/hash.o src/hooks.o src/large.o src/log.o src/malloc_io.o src/mutex.o src/mutex_pool.o src/nstime.o src/pages.o src/prng.o src/prof.o src/rtree.o src/stats.o src/sz.o src/tcache.o src/ticker.o src/tsd.o src/witness.o
make[3]: Leaving directory `/home/ec2-user/redis-stable/deps/jemalloc'
make[2]: Leaving directory `/home/ec2-user/redis-stable/deps'
CC adlist.o
CC quicklist.o
CC ae.o
CC anet.o
CC dict.o
CC server.o
In file included from server.c:30:0:
server.h:1044:5: error: expected specifier-qualifier-list before ‘_Atomic’
_Atomic unsigned int lruclock; /* Clock for LRU eviction */
^
server.c: In function ‘serverLogRaw’:
server.c:1028:31: error: ‘struct redisServer’ has no member named ‘logfile’
int log_to_stdout = server.logfile[0] == '\0';
^
server.c:1031:23: error: ‘struct redisServer’ has no member named ‘verbosity’
if (level < server.verbosity) return;
^
server.c:1033:47: error: ‘struct redisServer’ has no member named ‘logfile’
fp = log_to_stdout ? stdout : fopen(server.logfile,"a");
...and a lot more
I assume that I must have done something wrong as this is code that undoubtedly builds for everyone else. I'm a java developer with little to no c background. Any pointers will be appreciated.
Jay
Appears that gcc >= 4.9 is required to build redis 6x ...
Problem here is latest Redis version(6.0.7) depends on _Atomic which is not supported in older gcc 4.8.5.
One can also compile latest Redis code with clang if updating gcc version is not possible.
$ cd redis-stable
$ CC=clang make
i have successed.
at first i want to install gcc6, but failed again and agin, then i notise that,devtoolset-6 is deprecated. Maybe you should try -7 or -8.
then i use the flow cmd and it worked
yum install -y devtoolset-6-gcc devtoolset-7-gcc-c++
so i hope it can also help you
Thanks for the responses. The solution I ended up with was to build a new server with CentOS8 and gcc 8.3.1. This combination built the redis server 6.0.3 with no issues. Moral: you need to have up to date infra and software in order to properly build new software.
Download older version, seems some issue with 6.0.*
That worked for me on ubunt 14.04 LTS

Error: sockopt.c:216:27: error: 'SCTP_NODELAY' undeclared (first use in this function)

I am getting following error while trying to install httpd 2.0.49 from its source on ubuntu 12.04 machine.
sudo make
...
...
make[4]: Entering directory `/home/satya/httpd-2.0.49/srclib/apr/network_io/unix'
/bin/bash /home/satya/httpd-2.0.49/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -D_REENTRANT -D_GNU_SOURCE -I../../include -I../../include/arch/unix -I../../include/arch/unix -c sockopt.c && touch sockopt.lo
sockopt.c: In function 'apr_socket_opt_set':
sockopt.c:216:27: error: 'SCTP_NODELAY' undeclared (first use in this function)
I installed lksctp by executing sudo apt-get install lksctp-tools command and made few changes as suggested here
Even after doing this I am unable to compile the httpd and getting same error as above.
This is a bug in the configure script which assumes sctp is available even when it is not. This was fixed in later releases of 2.0.
Preferably, you should - if you want 2.0 - compile 2.0.65 instead.
Do however note that 2.0 is EOL (since 2013), so it is not officially supported by Apache anymore.

How to use cmake's 'make install' from a pbuilder env debian/rules script?

This is to compile and link a static library (so only a build time dependency) that the source is fetched from a repository (just like the source of the main program) on a ubuntu launchpad build bot.
currently i am doing:
#!/usr/bin/make -f
export PREFIX=/usr
export CFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
export CXXFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
%:
dh $#
override_dh_auto_configure:
cd src/munt;cmake -DCMAKE_CXX_FLAGS="-O3 -fomit-frame-pointer -flto" mt32emu;make;make install
#...compile of the program that depends on mt32emu...
But it fails with:
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libmt32emu.a
CMake Error at cmake_install.cmake:36 (FILE):
file INSTALL cannot copy file
"/tmp/buildd/dosbox-0.74+20121225/src/munt/libmt32emu.a" to
"/usr/local/lib/libmt32emu.a".
make[2]: *** [install] Error 1
make[2]: Leaving directory `/tmp/buildd/dosbox-0.74+20121225/src/munt'
make[1]: *** [override_dh_auto_configure] Error 2
make[1]: Leaving directory `/tmp/buildd/dosbox-0.74+20121225'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
I: unmounting /var/cache/pbuilder/ccache filesystem
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//2751 and its subdirectories
The idea is to install a static library dependency that is is not packaged in the ubuntu repositories in the launchpad pbuilder env, so it can be used as if it was a system dependency already.
If i try to do 'sudo make install' (and add sudo to the build-deps in debian/control), it asks me for the 'pbuilder' password when testing locally, which i'm assuming will hang the machine on the ubuntu buildbots.
edit: it actually fails on the buildbots because 'no tty present and no askpass program specified'.
There are several things you can do to clean up your rules file, especially when you are using dh.
In the % target, all of the dh command take a parameter builddirectory, which specifies what directory you are building in. This tells the builder to cd to that directory and then call commands (make, cmake, etc.).
In addition, you should just let dh install the files for you. This is done automatically. You shouldn't have to call make install manually.
Here's a slightly easier-to-read rules file:
#!/usr/bin/make -f
export PREFIX=/usr
export CFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
export CXXFLAGS= -O3 -fomit-frame-pointer -flto -fwhole-program
%:
dh $# --builddirectory=src/munt
override_dh_auto_configure:
cd src/munt && cmake -DCMAKE_CXX_FLAGS="-O3 -fomit-frame-pointer -flto" mt32emu
#...compile of the program that depends on mt32emu...
Is this just a permissions issue? (i.e. -- must use 'sudo' to install to '/usr/local'?)
Must you install it to '/usr/local'?
If it's just a static library, purely needed for the build of the "the program that depends on mt32emu" then you could put it anywhere, and just tell the dependent program where it is.
To install somewhere else, use -DCMAKE_INSTALL_PREFIX=/directory/where/you/have/write/privileges. Or use DESTDIR= with the make install.
I eventually 'solved' this by depending on launchpad repository dependencies, that is, building a whole package for the library and building that on launchpad and then importing the archive where that was placed to my other builds. Made it explicit i guess.

upgrade to osx lion, bundler gets native extension errors - no such file or directory

I am having a problem that has had me stuck for a day and a half, and I would like some assistance.
I have been moving my latest rails 3 app between my iMac and my macbook pro, with a simple copy, and up till now, I have had no problems.
fyi, I use rvm to manage my project versions.
I got a new iMac, with lion installed, and everything seemed to be good until I ran the bundle update on it. Since then I have not been able to get the bundler to work. The problems crop up when building a gem native extension.
Once I run the bundle update, nothing works on my iMac (osx lion) machine. I can continue to run bundle update on my laptop (Snow Leopard).
So I would like to be able to continue to develop on my Lion machine. Here is what I have done so far:
Initially, I got some errors about my compilers, but since I have reinstalled xcode and run the installer, I no longer those errors.
I still continued to get errors on my nokogiri build. At one point I followed some blog instructions ( and did:
sudo port upgrade --enforce-variants libxml2 +universal
but it seemed to make no difference to building nokogiri.
Now when I do the bundle update, I am getting:
Installing nokogiri (1.5.0) with native extensions /Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
make
gcc-4.2 -I. -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-darwin10.6.0 -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_XMLHASFEATURE -DHAVE_XMLFIRSTELEMENTCHILD -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS -I/opt/local/include/libxml2 -I/usr/local/include/libxml2 -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/libxml2 -I/opt/local/include -I/usr/local/include -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include -I/usr/include -I/usr/include/libxml2 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -o html_document.o -c html_document.c
make: gcc-4.2: No such file or directory
make: *** [html_document.o] Error 1
Gem files will remain installed in /Users/tayloredwebsites/.rvm/gems/ruby-1.9.2-p136#current/gems/nokogiri-1.5.0 for inspection.
After doing this waaaay too many times, I decided to remove capybara and lanuchy from my Gemfile, so that I would get past this error. Lo and behold, bundle update gives me another failure to build a native extension:
Installing sqlite3 (1.3.5) with native extensions /Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
creating Makefile
make
gcc-4.2 -I. -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-darwin10.6.0 -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/Users/tayloredwebsites/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_BACKUP_INIT -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o backup.o -c backup.c
make: gcc-4.2: No such file or directory
make: *** [backup.o] Error 1
So it appears that I am getting a no such file error on my builds, for the same set of code, with the basic difference that one machine is on Lion, and the other is on Snow Leopard.
So maybe someone can help me with these questions:
In my investigations, I noticed that in the nokogiri build, libxml2 is being asked for in 3 places (two of which do not exist!!!!). Anyone know how to control how to control these arguments, so that I can remove the ones that do not exist?
When I looked at the sqlite3 build, I did not notice any missing files, yet I seem to be still getting them. Could this be hung over from the nokogiri problem? If so, does anyone know how I clear these out?
I would like to know what file is missing, and I cant seem to find it in the error message. Is there any way to get debugger detail from the bundle update?
also I noticed that in the make, the include directory contains a directory named with an older version of ruby. This has been this way for quite a while, without any problems, so I suspect this will not be the problem here, but just wanted to point it out.
There is literally no such file or directory gcc-4.2 on Lion. I got stuck on this when trying to "rvm install ruby-1.9.3" which failed similar to what you report. A fix was to specify the CC command like this "CC=gcc rvm install ruby-1.9.3". If the CC=gcc option cannot be passed through to bundler, it might be simpler to "sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2" and just create the symlink it is looking for.
I have reinstalled everything on my OSX Lion. I upgraded to Server to get past some postgres issues. Note when I installed rvm, one of the steps is to run;
$ rvm requirements
which returns, among other things:
Xcode 4.2: * is only supported by ruby 1.9.3+ using command line
flag: --with-gcc=clang * it breaks gems with native extensions,
especially DB drivers.
Xcode 4.2.1+ users - please be warned - in case of any compilation
issues * downgrade to Xcode 4.1 * uninstall Xcode and install
osx-gcc-installer and reinstall your rubies.
Note: if you uninstall Xcode, you lose the standard MacPort Xcode setup.
Note you can build MacPorts from source using gcc - not tried (at least yet).
ln -s /usr/bin/gcc /usr/bin/gcc-4.2
I had built my ruby-1.9.3 with clang so when installing the nokogiri gem I used CC=clang gem install nokogiri -v '1.5.5' which worked for me.