I am building net-snmp 5.7.3 on Solaris11 sparc. I am having my path set as:
/usr/local/lib:/bin:/usr/bin:/usr/dev_infra/platform/bin:/usr/dev_infra/generic/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/ade/bin:/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/gnu:/usr/sbin:/usr/bin:/usr/ccs/bin/ar
I run ./configure --prefix=/opt with default option and it was successful. After that when i do make, i am getting below error message, Any help is appreciated.
libtool: compile: gcc -I../include -I. -I../snmplib -fno-strict-aliasing -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c keytools.c -fPIC -DPIC -o .libs/keytools.o
keytools.c: In function ‘generate_Ku’:
keytools.c:153:9: warning: assignment makes pointer from integer without a cast
keytools.c:161:9: error: invalid use of void expression
keytools.c:166:13: error: invalid use of void expression
*** Error code 1
make: Fatal error: Command failed for target `keytools.lo'
Current working directory /scratch/kkumsati/net-snmp/snmplib
*** Error code 1
The following command caused the error:
if test "snmplib agent apps man local mibs" != ""; then \
it="snmplib agent apps man local mibs" ; \
for i in $it ; do \
echo "making all in `pwd`/$i"; \
( cd $i ; make ) ; \
if test $? != 0 ; then \
exit 1 ; \
fi \
done \
fi
make: Fatal error: Command failed for target `subdirs'
Look for README.solaris file in source folder. It has 'Compiling net-snmp' section.
In README you could find the following:
You need to set your $PATH. This is extremely important
because otherwise there may be conflicts between the various
components of the development environment.
Wrong PATH is your problem.
The other possible problem are old openssl headers in your system.
You have an error about function EVP_MD_CTX_create() (error in keytools.c:153:9), this function is declared in Solaris file /usr/include/openssl/evp.h, this file is included in package pkg:/library/security/openssl. Version of this package on my OS is 1.0.1.18-0.175.3.5.0.5.0.
I recommend you to update OS, or package pkg:/library/security/openssl or try to run configure script with --with-openssl=internal option.
Also update gcc, I used this version
pkg install developer/gcc-48
export PATH=/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/bin:
./configure --prefix=/opt --with-mib-modules="ucd-snmp/lmSensors \
ucd-snmp/diskio smux mibII/mta_sendmail" --with-cc=gcc
gmake
Here I received an error about:
/usr/include/sys/processor.h:188:45: error: unknown type name 'kthread_t'
extern boolean_t i_processor_affinity_check(kthread_t *, struct cpu *);
^
/usr/include/sys/processor.h:189:37: error: unknown type name 'kthread_t'
extern int i_processor_affinity_one(kthread_t *, id_t, boolean_t);
^
/usr/include/sys/processor.h:190:33: error: unknown type name 'kthread_t'
extern int i_processor_affinity(kthread_t *, uint_t *, id_t *, uint32_t *,
^
To solve this edit file agent/mibgroup/host/data_access/swrun_procfs_psinfo.c and add to its header at 26 line (before problem line):
#include <sys/processor.h>
#include <sys/procset.h>
#include <thread.h>
Link about this bug
then repeat
gmake
gmake test
gmake install; #this command with root permissons
I succeed on SPARC.
Related
When I run brew install postgresql I get this as an error message:
Last 15 lines from /Users/admin/Library/Logs/Homebrew/icu4c/02.make:
./formatted_string_builder.h:227:9: note: subexpression not valid in a constant expression
U_ASSERT(category <= 0xf),
^
../common/uassert.h:35:26: note: expanded from macro 'U_ASSERT'
# define U_ASSERT(exp) void()
^
./formatted_string_builder.h:240:64: note: in call to 'Field(0, 1)'
constexpr FormattedStringBuilder::Field kGeneralNumericField = {UFIELD_CATEGORY_UNDEFINED, 1};
^
3 errors generated.
*** Failed compilation command follows: ----------------------------------------------------------
clang++ -DU_ATTRIBUTE_DEPRECATED= -DU_I18N_IMPLEMENTATION -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1 -I. -I../common -O2 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long -std=c++11 -Qunused-arguments -Wno-parentheses-equality -Wglobal-constructors -fvisibility=hidden -fno-common -c -MMD -MT numfmt.d numfmt.o numfmt.ao -o numfmt.ao numfmt.cpp
--- ( rebuild with "/Library/Developer/CommandLineTools/usr/bin/make VERBOSE=1 all" to show all parameters ) --------
make[1]: *** [numfmt.ao] Error 1
make: *** [all-recursive] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
icu4c 67.1 (make C++14 compatible) https://github.com/Homebrew/homebrew-core/pull/59540
Error: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
I have tried brew update (I am already up to date), and the only issue brew doctor gives me is that there are unexpected header files.
I am using
OSX Yosemite 10.10.5
Homebrew 2.4.12
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
I am encountering problems to install and run the MLton compiler in a Docker container using Alpine Linux.
Is there a way to install this compiler on this system?
Try #1
Using the standard `alpine base image and the binary distribution of MLton:
$ curl http://sourceforge.net/projects/mlton/files/mlton/20130715/mlton-20130715-1.amd64-linux.tgz --output mlton-20130715-1.amd64-linux.tgz
$ docker build .
With the following Dockerfile:
FROM alpine
COPY mlton-20130715-1.amd64-linux.tgz /
RUN apk add --no-cache bash build-base gmp-dev linux-headers \
&& tar xf /mlton-20130715-1.amd64-linux.tgz \
--directory /usr/ \
--strip-components 1 \
&& echo 'print "Hello, world!\n";' >> hello-world.sml \
&& mlton hello-world.sml
Docker build fails with the following error message, probably because glibc is missing.
/usr/bin/mlton: line 52: /usr/lib/mlton/mlton-compile: No such file or directory
Try #2
The same as above, with a base Docker image that embeds glibc:
FROM frolvlad/alpine-glibc
This time, mlton runs, but produces the following error:
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/mlton/targets/self/libmlton.a(platform.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
...
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
call to system failed with exit status 1:
gcc -o hello-world /tmp/fileGEluFu.o /tmp/fileYnNjh9.o -L/usr/lib/mlton/targets/self -lmlton -lgdtoa -lm -lgmp -m64 -Wl,-znoexecstack
Any idea on how to solve this problem?
When I try to build Emacs from https://github.com/emacs-mirror/emacs at 4f54f7b using ./autogen.sh it errors as
Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)
Checking for autoconf (need at least version 2.65)...
ok
Checking for automake (need at least version 1.11)...
ok
Your system has the required tools.
Running 'autoreconf -fi -I m4' ...
configure.ac:54: error: possibly undefined macro: AS_ECHO
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:95: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:245: error: possibly undefined macro: AC_DEFINE
configure.ac:752: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:763: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:1020: error: possibly undefined macro: AM_SUBST_NOTMAKE
configure.ac:1471: error: possibly undefined macro: m4_default
autoreconf: /usr/bin/autoconf failed with exit status: 1
I've tried the common tricks to solve it without success. What to do?
Update: make bootstrap fails as
cd . && ACLOCAL_PATH='' /bin/bash /home/per/Work/emacs/build-aux/missing aclocal-1.14 -I m4
if [ -x ./config.status ]; then \
./config.status --recheck; \
else \
./configure --cache-file=/dev/null; \
fi
cd . && /bin/bash /home/per/Work/emacs/build-aux/missing automake-1.14 --gnu -a -c lib/Makefile
[ -r "src/config.in" ] || ( cd . && /bin/bash /home/per/Work/emacs/build-aux/missing autoheader )
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --prefix=/home/per/opt/x86_64-unknown-linux-gnu/emacs-snapshot CFLAGS=-O2 PKG_CONFIG_PATH=/home/per/opt/x86_64-unknown-linux-gnu/fish-snapshot/share/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/sparsehash-2.0.2/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/igraph-0.6/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/libarchive-snapshot/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/libgit2-snapshot/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/nettle-3.0/lib/pkgconfig: --no-create --no-recursion
checking for xcrun... no
checking for GNU Make... make
./configure: line 2853: syntax error near unexpected token `1.11'
./configure: line 2853: `AM_INIT_AUTOMAKE(1.11)'
Makefile:412: receptet för målet ”config.status” misslyckades
make: *** [config.status] Fel 2
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