Autoconf version error during Octave installation with Homebrew - macos

I am trying to install Octave using Homebrew on MacBook Pro 10.6.8. Here is the installation log:
asz /usr/share/autoconf/autoconf > brew install octave
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading http://ftpmirror.gnu.org/octave/octave-3.6.4.tar.bz2
Already downloaded: /Library/Caches/Homebrew/octave-3.6.4.tar.bz2
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file configure.ac
Hunk #1 succeeded at 1605 (offset 2 lines).
==> autoreconf -ivf
configure.ac:45: error: Autoconf version 2.62 or higher is required
configure.ac:45: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
aclocal: /usr/bin/autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63
As you can see it complains about the version of autoconf being to low. However I did install the higher version of autoconf with brew
asz ~ > autoconf --version
autoconf (GNU Autoconf) 2.69
(...)
I did update my PATH to point to this new version of autoconf,
Old autoconf was in:
asz ~ > which autoconf
/usr/bin/autoconf
New one is in:
asz ~ > which autoconf
/usr/local/Cellar/autoconf/2.69/bin/autoconf
but Homebrew still does not see it (same error). While searching for solution I found this hint in response to similar problem quoting:
This is coming from the run of aclocal, which is part of automake.
aclocal does not call the autoconf binary, so the path that your
autoconf is in doesn't matter. It does look at m4 macros, though, and
I'm guessing it's finding autoconf macros out of /usr/share, which would
correspond to the system autoconf which would be 2.61 on osx Link to original post outside of Stackoverflow.
I don't understand what I should do with it.
Can you tell me how do I update these macros to point to the new autoconf?
Is there any other way to make autoconf work?
What additional information can I provide you to help diagnose problem?

just had your same problem. What I did was :
cd /usr/share
mv autconf autoconf.old
ln -s /usr/local/share/autoconf .
Now the problem is not the version anymore but some other variable :4/libtool.m4:827: _LT_LANG_DEFAULT_CONFIG is expanded from...
configure.ac:48: error: possibly undefined macro: AM_SILENT_RULES
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
will see what comes out of the next search phase

Related

Unknown options when running makefiles for linux kernel building

I'm building a linux kernel on macbook OS X, and the same error happens whenever I run a make command. I've already tried everything I know, including:
Check if any packages need to be installed.
Create a case-sensitive disk image.
The linux version I use is stable v5.8.9. Error prompts here:
% make defconfig
*** Default configuration is based on 'x86_64_defconfig'
ld: unknown option: --version
init/Kconfig:39: syntax error
init/Kconfig:38: invalid statement
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
make[2]: *** [defconfig] Error 1
make[1]: *** [defconfig] Error 2
make: *** [__sub-make] Error 2
My software environments using homebrew here:
bdw-gc gmp libidn2 make python#3.8
coreutils gnu-sed libpng ncurses qemu
ctags gnu-tar libssh nettle readline
elf-header gnutls libtasn1 openssl#1.1 snappy
findutils guile libtool p11-kit sqlite
gdbm jpeg libunistring pcre unbound
gettext libelf libusb pcre2 vde
git libevent llvm pixman xz
glib libffi lzo pkg-config
I think I'm in a very early stage of kernel building, and there must be some simple mistake, does anyone has any ideas?

Installing gcc with OpenMP support on Mac using homebrew has no effect

One way of installing gcc with openMP support on OSX is using Homebrew. However, when I follow the usual instruction of
brew reinstall gcc --without-multilib
It gives me a warning that there is no formula corresponding to the --without-multilib option and hence this will have no effect. Consequently, I do not have openMP support after this reinstallation process. Here is the detailed terminal output.
poulin8:02-prange-parallel-loops poulingroup$ brew --version
Homebrew 1.3.6
Homebrew/homebrew-core (git revision b5afc; last commit 2017-10-27)
poulin8:02-prange-parallel-loops poulingroup$ brew reinstall gcc --without-multilib
==> Reinstalling gcc
Warning: gcc: this formula has no --without-multilib option so it will be ignored!
==> Downloading https://homebrew.bintray.com/bottles/gcc-7.2.0.el_capitan.bottle
Already downloaded: /Users/poulingroup/Library/Caches/Homebrew/gcc-7.2.0.el_capitan.bottle.tar.gz
==> Pouring gcc-7.2.0.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/gcc/7.2.0: 1,486 files, 289.8MB
poulin8:02-prange-parallel-loops poulingroup$
Upon including omp.h in a file and compiling, I get the error
julia.c:447:10: fatal error: 'omp.h' file not found
#include <omp.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Could someone please help me with installing gcc on OSX with openMP support?
If you can substitute clang for gcc I was able to get clang to compile OpenMP programs quite easily. I built the latest version of LLVM/clang and used homebrew to install libomp via brew install libomp.
Full steps were something like:
mkdir omp_clang && cd omp_clang
git clone https://github.com/llvm-mirror/llvm.git -b release_60
git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang -b release_60
mkdir build && cd build
cmake ../llvm
make
brew install libomp
./bin/clang -fopenmp=libomp ~/openmp_program.c

Why can't I compile with gfortran after upgrading to OSX Yosemite? gfortran error: libgfortran.spec: No such file or directory

Since upgrading to Yosemite I cannot compile with gfortran. Initially I was getting "segmentation fault 11", then I:
Updated to gcc v.5.0 from http://hpc.sourceforge.net/
Re-installed Xcode command line utilities v.6.1.1
After doing the above, I am able to compile very simple fortran programs but the more complex code that I run gives me the following error:
gfortran: error: libgfortran.spec: No such file or directory
But in fact, the libgfortran.spec file is located in /usr/local/lib
ls /usr/local/lib | grep gfortran
libgfortran.3.dylib
libgfortran.a
libgfortran.dylib
libgfortran.la
libgfortran.spec
All of the gcc binaries are located in /usr/local/bin
which gfortran
/usr/local/bin/gfortran
And my path seems to be OK
echo $PATH
/usr/local/lib:/usr/local/bin:/usr/local:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib:/usr/texbin:/Users/MattCooper/bin:/Applications/MRT/bin
I also tried re-installing gcc with homebrew:
brew install gcc
Error: gcc-4.9.2 already installed
To install this version, first 'brew unlink gcc'
However, I get v. 5.0 when I ask 'gcc --version':
gcc --version
gcc (GCC) 5.0.0 20141005 (experimental)
When I try to unlink or upgrade gcc with homebrew I get a permission denied error:
brew unlink gcc
Unlinking /usr/local/Cellar/gcc/4.9.2... Error: Permission denied - /usr/local/bin/c++-4.9
similarly
brew upgrade gcc
Permission denied - /usr/local/bin/c++-4.9
Finally
which gcc
/usr/local/bin/gcc
Please help. Many thanks ahead of time. Please let me know what I've forgotten to include.
I ended up solving the problem via homebrew. I can't pinpoint the exact source of the problem but it was related to the fact that I installed gcc v4.9 from http://hpc.sourceforge.net/, then somewhere along the way I re-installed and/or updated gcc with homebrew. Then, after upgrading to Yosemite, I installed gcc v5 from http://hpc.sourceforge.net/. Somewhere within that process, the binaries within /usr/local/bin and usr/local/lib were not linked properly.
The main clue was the Permission Denied error when trying to run 'brew upgrade gcc'. I found a solution here: Brew doctor says: "Warning: /usr/local/include isn't writable."
To fix, I used:
brew doctor
which returned a bunch of directories that were not writeable, for example usr/local/lib, thus brew was unable to ugrade gcc to the v5.0 and link everything.
I went through and issued:
sudo chown -R $USER /usr/local
and did this for all of the other non-writeable directories returned by 'brew doctor'. Then, I was able to use brew to ugrade gcc:
brew upgrade gcc
During the ugrade, homebrew returned an error that stated it could not finish the upgrade because there was already an existing gfortran file located in:
/usr/local/bin/gfortran
To fix, homebrew suggested I run:
brew -link gcc
at which point everything worked. Interesting (to me, because I don't fully understand all of this) when I ask brew to clean things up, I get:
brew cleanup
Warning: Skipping (old) /usr/local/Cellar/gcc/4.9.2 due to it being linked
There's some similar information located here: How to link to a new gcc version with brew?
Similar to that user, when I look in my cellar, I find two versions of gcc, but I'm not sure if I need both
ls /usr/local/Cellar/gcc
4.9.2 4.9.2_1
I had a similar issue with similar solution. It could not find this file:
gfortran: error: libgfortran.spec: No such file or directory
So my problem was that I had installed gcc through hpc.sourceforge.net and through homebrew. I had to uninstall the homebrew version
brew uninstall gcc
Then I had to reinstall the gcc from hpc.sourceforge.net
sudo tar -xvf gcc-4.9-bin.tar.gz -C /
This worked for me when I wanted to revert to gcc 4.9 from hpc.sourceforge.net, using Yosemite.

LLVM Opt missing in OS X 10.9.2

I am using Haskell's GHC to create LLVM code but it cannot find opt from LLVM. I googled the problem and it was recommended to install LLVM from homebrew, which I did, but there's no opt binary on my path. I am wondering where I can get it from so I compile LLVM code from GHC?
The only solution I found was to download the prebuilt binaries from the LLVM web site: http://llvm.org/releases/download.html
Homebrew is quite explicit about how it installs LLVM:
~$ brew install llvm
==> Downloading https://homebrew.bintray.com/bottles/llvm-3.6.2.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm-3.6.2.mavericks.bottle.tar.gz
==> Pouring llvm-3.6.2.mavericks.bottle.tar.gz
==> Caveats
LLVM executables are installed in /usr/local/opt/llvm/bin.
Extra tools are installed in /usr/local/opt/llvm/share/llvm.
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/llvm/lib
CPPFLAGS: -I/usr/local/opt/llvm/include
==> Summary
🍺 /usr/local/Cellar/llvm/3.6.2: 811 files, 291M
so what I did was simply export PATH=/usr/local/opt/llvm:$PATH prior to executing any GHC commands that required LLVM.

Error: AC_DEFINE() is not found to autoreconf --force --install

Description:
I am doing Customization for tacacs+ server open source code. While packaging
i am tring to run configure to genrate Makefile.
Note: In open source tacacs+ tar is using autoconf 2.63 & on my build machine is having
2.67 autoconf version. Only this the env diff.
But get AC_DEFINE() undefined error as below:
d001:~/srcsvn/workspace_main_7.40_04102013_64bit/NMD2/64bit/os/usr.local/tacplus_merger/src/tacacs+-4.0.4.19.orig$ autoreconf --force --install
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `cfgaux'.
libtoolize: copying file `cfgaux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in:45: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Check the file configure.in in line 45 and above and scan for pkg-config calls.
Then check if you have it installed (just type pkg-config). If this fails, you are missing pkg-config. Apply your distros way of installing software (rpm, apt-get, pacman, bee) and install the missing pkg-config package.
This happens all too often when something unrelated to it is misquoting the usage of the macro.
While it does not help much without knowing what the configure.ac looks like, you should observe the lines around line 45, rather than on that line, to figure out what's going wrong. Sometimes it can be just a misplaced [] quote.

Resources