aclocal not found for mingw sh autogen.sh execution - windows

i'm trying to execute
./autogen.sh
script in cppunit folder from
http://www.freedesktop.org/wiki/Software/cppunit
but in a mingw shell(sh) i get next error:
error: aclocal not found
aclocal m4 scripts are in
c:\MinGW\share\
directory.
How to fix that error?

Had a similar problem when compiling a libmodbus library (it uses the same build principle). I have entered the following commands in MSYS shell:
pacman -S msys/libtool
pacman -S msys/autoconf
pacman -S msys/automake-wrapper
After that I was able to execute autogen.sh

it happens on ubuntu as well to overcome to this in ubuntu install automake libtool
apt-get install automake libtool

I've tried to directly run aclocal from shell sh.
And it printed another error message:
Can't locate Automake/Config.pm in #INC (#INC contains: /mingw/...
As in question: Error while building Linphone for windows
So i mounter /mingw by command:
mount c:/mingw /mingw
and script works now.

This did for me:
pacman -S --needed --noconfirm autoconf automake libtool make

Aclocal is part of automake tools, not a standalone package.
Install from source to get latest version or use apt
sudo apt-get install automake
OR
VERSION=1.15
wget ftp://ftp.gnu.org/gnu/automake/automake-${VERSION}.tar.gz &> /dev/null
if [ -f "automake-${VERSION}.tar.gz" ]; then
tar -xzf automake-${VERSION}.tar.gz
cd automake-${VERSION}/
./configure
make && make install
echo -e "\e[1;39m[ \e[1;32mOK\e[39m ] automake-${VERSION} installed\e[0;39m"
else
echo -e "\e[1;39m[ \e[31mError\e[39m ] cannot fetch file from ftp://ftp.gnu.org/gnu/automake/ \e[0;39m"
exit 1
fi
to install from source

Related

unrecognized option --gc-keep-exported on arm ld

Right now, I'm trying to integrate a GitHub Action that checks if some code on a pull request compiles properly (VEX Robotics for anyone interested). However, when it gets to running the make command, I get this error:
Building Project
make: Entering directory '/github/workspace/V5'
Adding timestamp [OK]
Creating cold package with libpros,okapilib [ERRORS]
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: unrecognized option '--gc-keep-exported'
/usr/lib/gcc/arm-none-eabi/6.3.1/../../../arm-none-eabi/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [bin/cold.package.elf] Error 1
common.mk:200: recipe for target 'bin/cold.package.elf' failed
I'm extremely confused as to why this is occurring? --gc-keep-exported is a real option, and this code compiles perfectly on my local machine. I've tried changing the ubuntu version and updating the VEX SDK to see if it helps, but I keep on getting the same error. What should I do?
Code:
Dockerfile:
FROM ubuntu:18.04
RUN apt-get update
# Install GCC & Clang
RUN apt-get install build-essential -y
RUN apt-get install clang -y
# Install needed ARM deps
RUN apt-get install gcc-arm-none-eabi -y
RUN apt-get install binutils-arm-none-eabi -y
# Install 7z & cURL
RUN apt-get install p7zip-full -y
RUN apt-get install curl -y
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
entrypoint.sh:
echo "Downloading VEX SDK"
# Get VEX SDK and put it in ~/sdk
curl -L https://content.vexrobotics.com/vexcode/v5code/VEXcodeProV5_2_0_1.dmg -o _vexcode_.dmg
7z x _vexcode_.dmg || :
7z x Payload~ ./VEXcode\ Pro\ V5.app/Contents/Resources/sdk -osdk_temp || :
mkdir ~/sdk
mv sdk_temp/VEXcode\ Pro\ V5.app/Contents/Resources/sdk/* ~/sdk
rm -fR _vex*_ _vex*_.dmg sdk_temp/ Payload~
ls ~/sdk # ls just for testing
echo "Building Project"
# Now make the makefile in the set path
make --directory=$1
The reason this was happening was because I used an old version of gcc-arm-none-eabi. The version on apt is super outdated (v6.3.1 vs v10.2.1).
I was able to use the new version by downloading the tarball available on their site and using the direct paths to compile my code.
There is a newer GCC version available for a newer Ubuntu version, you could browse for another one, or be lazy and enjoy some malpractice with me:
FROM ubuntu:latest

protoc: command not found (Linux)

I am trying to use Protobuf on Linux box. I downloaded the pre-compiled from github.
When I try to compile my .proto file or just check the protobuf version, it says
protoc: command not found.
I tried the same steps on Windows machine using pre-compiled protobuf version and it works fine there.
Install protoc for Linux and Mac
Linux
PROTOC_ZIP=protoc-3.15.8-linux-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local include/*
rm -f $PROTOC_ZIP
Mac OS X
brew install protobuf
Alternately, if you don't have Homebrew.
PROTOC_ZIP=protoc-3.15.8-osx-x86_64.zip
curl -OL https://github.com/google/protobuf/releases/download/v3.15.8/$PROTOC_ZIP
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*'
rm -f $PROTOC_ZIP
source: http://google.github.io/proto-lens/installing-protoc.html
For Linux Ubuntu 20, only install with snap
snap install protobuf --classic
or via apt, with:
sudo apt install protobuf-compiler
You can try it:
Install grpc and protobuf
brew install grpc protobuf
I know this question is specifically asked for Linux and I could n't find any question as it relates to solving this error on Windows.
This might help people who encounter the same error on windows.
Step 1: Download the windows distribution (protoc-3.5.0-win32.zip) from the link protobuf and unzip locally to a folder
Step 2 : Add the folder path to the path in the system environment variables.
Step 3: close the command prompt, restart the command prompt and try the command protoc
I might be late to the party but I also had "command not found" when trying to run protoc. It turned out it was just missing the execute permission. A quick chmod +x protoc fixed this for me.

Hydra on Windows comes up with "[ERROR] Compiled without LIBSSH v0.4.x support, module is not available"

After trying to run the following query with THC-HYDRA:
hydra -l ROOT -P pass.lst -M hosts.lst ssh
I get this responce:
Hydra v7.5 (c)2013 by van Hauser/THC & David Maciejak - for legal purposes only
Hydra (http://www.thc.org/thc-hydra) starting at 2013-11-15 16:35:56
[ERROR] Compiled without LIBSSH v0.4.x support, module is not available!
I downloaded LIBSSH from libssh.org and installed it to no avail. The internet seems to hold no answers however I can see others have asked the same question.
Thanks very much indeed,
user.
I was having the same problem. I compiled and then realized I forgot libssh when I tried to run it against my router so I installed it and recompiled; still it was not working.
I tried "make clean" and it worked like a charm.
apt-get purge hydra
apt-get install cmake libssl-dev
cd /usr/local/src
wget http://www.libssh.org/files/0.4/libssh-0.4.8.tar.gz
tar zxf libssh-0.4.8.tar.gz
cd libssh-0.4.8
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_SSH1=ON ..
make
make install
cd /usr/local/src
wget http://freeworld.thc.org/releases/hydra-6.3-src.tar.gz
tar zxf hydra-6.3-src.tar.gz
cd hydra-6.3-src
./configure
make
make install

How do I compile jzmq for ZeroMQ on OSX?

Trying to follow the directions from: http://github.com/zeromq/jzmq
I installed pkg-config using Homebrew and then I run the following commands:
./autogen.sh
./configure
The configure fails with:
checking how to hardcode library paths into programs... immediate
./configure: line 15263: syntax error near unexpected token `newline'
./configure: line 15263: ` PKG_CHECK_MODULES('
A better solution is:
eval `brew --config | grep HOMEBREW_PREFIX | sed 's/: /=/'`
sudo bash -c 'echo '$HOMEBREW_PREFIX/share/aclocal' >> `aclocal --print-ac-dir`/dirlist'
This will allow the version of aclocal that ships with OSX to find any macros installed by homebrew packages.
With homebrew, the key is the warning message:
~/code/foss/java/jzmq$ brew install pkg-config
==> Downloading http://pkg-config.freedesktop.org/releases/pkg-config-0.25.tar.gz
==> ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.25 --with-pc-path=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
==> make install
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
==> Summary
/usr/local/Cellar/pkg-config/0.25: 8 files, 232K, built in 19 seconds
If you look at /usr/local/Cellar/pkg-config/0.25/share/aclocal/, you will see:
$ ls /usr/local/Cellar/pkg-config/0.25/share/aclocal/
pkg.m4
You need to append /usr/local/Cellar/pkg-config/0.25/share/aclocal/ to /usr/share/aclocal/dirlist,like this:
$ cat /usr/share/aclocal/dirlist
/usr/local/share/aclocal
/usr/local/Cellar/pkg-config/0.25/share/aclocal/
And then re-run autogen and the other steps.
I made a simple list about jzmq building for MacOS.
Install brew
https://brew.sh
Install tools for jzmq building
brew install autoconf
brew install automake
brew install libtool
brew install pkg-config
brew install zeromq#3.2
Download jzmq source
https://github.com/zeromq/jzmq source download to ~/somewhere/jzmq
Add symbolic link to /usr/local/include
cd /usr/local/include
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/include/zmq.h
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/include/zmq_utils.h
Add symbolic linke to /usr/local/lib
cd /usr/local/lib
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/lib/libzmq.3.dylib
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/lib/libzmq.a
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/lib/libmq.dylib
ln -s /usr/local/Cellar/zeromq\#3.2/3.2.5/lib/pkgconfig/
Build jzmq-jni
cd ~/somewhere/jzmq
cd jzmq-jni
./autogen.sh
./configure
make
make install
Add option to VM options
VM options -Djava.library.path=/usr/local/lib
From the zeromq mailing list:
Building 0MQ from the development
trunk on a UNIX style OS (Linux, OS X)
requires that pkg-config
(http://pkg-config.freedesktop.org/wiki/)
be installed. A regular source build
of 0MQ does not require pkg-config.
On Mac OS X, pkg-config does not come
with the system, so when you try to do
./configure you may see errors like:
./configure: line 23913: syntax error near unexpected token `GLIB,'
./configure: line 23913: `PKG_CHECK_MODULES(GLIB, glib-2.0 gthread-2.0)'
To resolve this, you need to install
the latest pkg-config:
tar xzf pkg-config-0.25.tar.gz
cd pkg-config-0.25
./configure --prefix=/usr/local/pkg-config-0.25 --datarootdir=/usr/share
make
sudo make install
Then you will need to put
/usr/local/pkg-config-0.25/bin on your
$PATH. It is important to include the
"--datarootdir=/usr/share" option,
which will install the pkg.m4 file in
/usr/share/aclocal, where aclocal will
be able to find it.
Then you can build 0MQ:
cd zeromq2
./autogen.sh # must do this again after installing pkg-config
./configure # add other options here
make
sudo make install
Edited to reflect latest pkg-config version (0.25).
I came here with the same question, and I don't feel this is answered. I also installed ZeroMQ and pkg-config via Homebrew. /usr/local/share/aclocal/pkg.m4 exists and comes from pkg-config 0.25. It seems that Homebrew has satisfied the requirements listed but it still fails.
Trying to compile jzmq on Mac OS X, proved to be a bit of a headache. I followed the instructions above. I was still getting following error
syntax error near unexpected token
`PKG_CHECK_MODULES
The instructions above tell you to copy the pkgk.m4 file into /usr/share/aclocal, but your directory might be different. Basically you need the dir that automake searches for macro definitions.
The _PKG_CHECK_MODULES_ macro is defined in the pkg.m4 file. This file must be installed in the appropriate directory, which is searched by automake. Somehow automake is installed twice on my OS X, one in /usr and another in /Developer/usr. Make sure you know which one it's using. Just do which automake. If yours in is /Developer/usr, then copy the pkg.m4 file to /Developer/usr/share/aclocal.
For me, the problem was that I didn't have pkg-config installed.
On Osx Mountain Lion I don't have the dirlist file as Phil Calçado said, but a simple symlink from /usr/local/Cellar/pkg-config/[version]/share/aclocal/pkg.m4 to /usr/share/aclocal made the trick and now jzmq build fine.

How to compile Clisp 2.46?

When I try to compile the newest version of Clisp on Ubuntu 8.04 I always get this error after running configure:
Configure findings:
FFI: no (user requested: default)
readline: yes (user requested: yes)
libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
generational garbage collection and
stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
mkdir tools; cd tools; prefix=`pwd`/i686-pc-linux-gnu
wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.5.tar.gz
tar xfz libsigsegv-2.5.tar.gz
cd libsigsegv-2.5
./configure --prefix=${prefix} && make && make check && make install
cd ../..
./configure --with-libsigsegv-prefix=${prefix} --with-readline --with-unicode --with-module=i18n --with-module=gdbm --with-module=pcre --with-module=readline --with-module=regexp
If you insist on building without libsigsegv, please pass
--ignore-absence-of-libsigsegv
to this script:
./configure --ignore-absence-of-libsigsegv --with-readline --with-unicode --with-module=i18n --with-module=gdbm --with-module=pcre --with-module=readline --with-module=regexp
I've tried doing as requested, but it didn't help: it seems to ignore the --with-libsigsegv-prefix option. I also tried putting installing libsigsegv in a standard location (/usr/local). Oh, and of course, Ubuntu tells me that libsigsegv and libsigsegv-dev are installed in the system.
I'd really like to be able to compile this version of Clips, as it introduces some serious improvements over the version shipped with Ubuntu (I'd also like to have PCRE).
Here are my notes from compiling CLISP on Ubuntu in the past, hope this helps:
sudo apt-get install libsigsegv-dev libreadline5-dev
# as of 7.10, Ubuntu's libffcall1-dev is broken and I had to get it from CVS
# and make sure CLISP didn't use Ubuntu's version.
sudo apt-get remove libffcall1-dev libffcall1
cvs -z3 -d:pserver:anonymous#cvs.sv.gnu.org:/sources/libffcall co -P ffcall
cd ffcall; ./configure; make
sudo make install
cvs -z3 -d:pserver:anonymous#clisp.cvs.sourceforge.net:/cvsroot/clisp co -P clisp
cd clisp
./configure --with-libffcall-prefix=/usr/local --prefix=/home/luis/Software
ulimit -s 16384
cd src; make install
If you look at 'config.log' it might tell you why configure is not finding libsigsegv

Resources