Mac OS X
I do configure and then make my odbc binary.
That is configure command:
./configure CFLAGS="-arch i386 -arch x86_64 -D par1=1024" --enable-pthreads --with-iodbc=/usr/local/iODBC --with-libpq=$pg_dir
But the result is:
...
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
./configure: line 4506: syntax error near unexpected token `with,'
./configure: line 4506: `PGAC_ARG_REQ(with, odbcver,'
make: *** [config.status] Error 2
...
What is the reason and what to check and fix?
I run
autoconf
----------
autoconf
aclocal.m4:21: warning: this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
configure.ac:331: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
configure.ac:331: the top level
configure.ac:331: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
configure.ac:331: the top level
configure.ac:64: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
The one of reasons is: the macro PGAC_ARG_REQ and some other were undefined, I have found the *.m4, copied and it works.
Thanks l'L'l for the great help!
Related
I'm trying to install Boogie (22 Oct 2012 version) on Mac OS X 10.8. I downloaded the Boogie from here, and installed Mono 3.4.0. Boogie without the verify option worked fine for me.
Next, I needed to install Z3. I tried the nightly OS X build because I thought that would be simplest, but Boogie gave a lot of errors along the lines of:
Prover error: line 5 column 22: the parameter 'model_v2' was renamed to 'model.v2', invoke 'z3 -p' to obtain the new parameter list, and 'z3 -pp:model.v2' for the full description of the parameter
So I tried to download the source for Z3 version 4.1 and compile it. I ran autoconf, and configure without any problems, but make had many errors:
$ autoconf
$ ./configure
checking for dos2unix... /usr/local/bin/dos2unix
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make sets $(MAKE)... yes
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated
checking how to run the C++ preprocessor... g++ -E
configure: creating ./config.status
config.status: creating Makefile
Z3 was configured with success.
Host platform: osx
Arithmetic: internal
Type 'make' to compile Z3.
$ make
Makefile:271: obj/external/act_cache.d: No such file or directory
Makefile:271: obj/external/add_bounds.d: No such file or directory
Makefile:271: obj/external/add_bounds_tactic.d: No such file or directory
Makefile:271: obj/external/aig.d: No such file or directory
....
(many like this)
....
Makefile:273: obj-test/external/array_property_expander.d: No such file or directory
Makefile:273: obj-test/external/arith_rewriter.d: No such file or directory
Makefile:273: obj-test/external/arith_simplifier_plugin.d: No such file or directory
Makefile:273: obj-test/external/ast.d: No such file or directory
....
(and more like this)
....
Making dependency file 'obj-test/external/bits.d' ...
clang: warning: argument unused during compilation: '-fopenmp'
clang: warning: argument unused during compilation: '-mfpmath=sse'
In file included from test/bits.cpp:5:
In file included from lib/mpz.h:29:
lib/z3_omp.h:23:9: fatal error: 'omp.h' file not found
#include"omp.h"
^
1 error generated.
Any idea what could be wrong? My g++ version is:
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
EDIT: I followed Christoph's suggestions, and I could start the build successfully, but at some point I got the following errors:
clang: warning: argument unused during compilation: '-mfpmath=sse'
lib/hwf.cpp:27:14: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas]
#pragma STDC FENV_ACCESS ON
^
In file included from lib/hwf.cpp:50:
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1388:22: error: expected expression
return (__m128)__in;
^
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1394:23: error: expected expression
return (__m128i)__in;
^
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1400:23: error: expected expression
return (__m128d)__in;
^
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1406:23: error: expected expression
return (__m128i)__in;
^
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1412:22: error: expected expression
return (__m128)__in;
^
/usr/bin/../lib/clang/5.0/include/emmintrin.h:1418:23: error: expected expression
return (__m128d)__in;
^
1 warning and 6 errors generated.
Any ideas?
This one is a bit tricky as Boogie doesn't support the new Z3 (see also here), but the old 4.1.2 version of Z3 doesn't support the new compiler (clang) on OSX 10.9. This is mainly because clang lacks support for OpenMP. We can build this version of Z3 without support for OpenMP though, by adding -D_NO_OMP_ to the CPPFLAGS line in the Makefile, or by running
CPPFLAGS=-D_NO_OMP_ LDFLAGS=-stdlib=libstdc++ ./configure
on the command line (the LDFLAGS setting is required because clang selects an unsuitable standard C++ library by default; see here for details). We then need to replace all occurrences of -fopenmp in the Makefile, e.g., by running
sed -i '' "s/-fopenmp//" Makefile
Once that is done, Z3 4.1.2 should build successfully.
I cloned from git:
git clone git://git.apache.org/mesos.git
and also had done
brew install autoconf automake libtool
Then trying to follow the "Getting started" at
http://mesos.apache.org/gettingstarted/
And specifically :
Only if running from source code cloned from git,
run ./bootstrap otherwise skip to step 3
So I ran
./bootstrap
Here is a trimmed output of the results. I did not see any ERRORS as such but plenty of WARNings. End result exited with 1 and no configure script was generated:
autoreconf: configure.ac: adding subdirectory 3rdparty/stout to autoreconf
autoreconf: Entering directory `3rdparty/stout'
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --warnings=all
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force --warnings=all
configure.ac:10: installing './missing'
autoreconf: Leaving directory `3rdparty/stout'
autoreconf: running: glibtoolize --copy
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./ltmain.sh'
..
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
..
m4/libtool.m4:694: LT_OUTPUT is expanded from...
configure.ac:28: the top level
configure.ac:87: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/lang.m4:128: AC_LANG_SAVE is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:21: installing './ar-lib'
configure.ac:21: installing './compile'
configure.ac:8: installing './config.guess'
configure.ac:8: installing './config.sub'
configure.ac:18: installing './missing'
automake: warnings are treated as errors
3rdparty/Makefile.am:71: warning: source file '$(GTEST)/src/gtest-all.cc' is in a subdirectory,
3rdparty/Makefile.am:71: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
3rdparty/Makefile.am:71: warning: source file '$(GMOCK)/src/gmock-all.cc' is in a subdirectory,
3rdparty/Makefile.am:71: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:61: warning: source file '$(RY_HTTP_PARSER)/http_parser.c' is in a subdirectory,
3rdparty/Makefile.am:61: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:118: warning: source file '$(STOUT)/tests/bytes_tests.cpp' is in a subdirectory,
..
3rdparty/Makefile.am:118: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:118: warning: source file '$(STOUT)/tests/flags_tests.cpp' is in a subdirectory,
3rdparty/Makefile.am:118: but option 'subdir-objects' is disabled
..
3rdparty/Makefile.am:146: warning: source file '$(STOUT)/tests/proc_tests.cpp' is in a subdirectory,
3rdparty/Makefile.am:146: but option 'subdir-objects' is disabled
3rdparty/Makefile.am: installing './depcomp'
Makefile.am:29: warning: source file 'src/latch.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/pid.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/process.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/statistics.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
..
Makefile.am:101: warning: source file 'src/tests/shared_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
Makefile.am:101: warning: source file 'src/tests/statistics_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
Makefile.am:101: warning: source file 'src/tests/time_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
autoreconf: automake failed with exit status: 1
The Mesos team updated the "Getting Started" document with instructions on building and running Mesos on Mavericks.
GCC was replaced with Clang on Mavericks, and so you first have to install GCC 4.7+. You can use Homebrew to install it (Note: installing GCC takes a loooong time):
brew tap homebrew/versions
brew install gcc48
This is the gist of getting started on Mavericks:
# Make sure you have the right versions of automake and GCC.
# For example:
$ automake --version
automake (GNU automake) 1.12.6
...
$ aclocal --version
aclocal (GNU automake) 1.12.6
...
$ gcc-4.8 --version
gcc-4.8 (GCC) 4.8.1
...
# Follow bootstrap steps above.
# Configure and build.
$ mkdir build
$ cd build
# The prepending CC and CXX will select custom compilers to build Mesos with.
$ CC=gcc-4.8 CXX=g++-4.8 ../configure
I am trying to enable c++11 for gcc 4.6; I am using autconf and I added following to my configure.ac file
AC_PREREQ(2.61)
AC_INIT(SOLARCORE, 1.0.0, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE([1.10 no-define foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/threading/node.h])
AC_CONFIG_HEADER([config.h])
AC_OUTPUT([Makefile src/threading/Makefile])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
#AC_LANG_PUSH([C++])
AC_LANG([C++])
AC_GNU_SOURCE
AX_CXX_COMPILE_STDCXX_11(,[mandatory])
CXXFLAGS='-Wall -std=gnu++0x'
AC_TYPE_SIZE_T
AC_OUTPUT
I am getting following error
./configure: line 4949: syntax error near unexpected token ,mandatory'
./configure: line 4949:AX_CXX_COMPILE_STDCXX_11(,mandatory)'
I also tried AX_CXX_COMPILE_STDCXX_11([ext],[mandatory])
I want to enable C++11 so that I can use it. I tried without AX_CXX_COMPILE_STDCXX_11 and with just CXXFLAGS in my Makefile but it is not working. So please help. THanks.
Found the answer: Recent version of AX_CXX_COMPILE_STDCXX_11 doesnt need a argument.
Are you sure you have the latest version of the macro? Judging from the history available from the autoconf archive, the original version of the macro only expected one argument, not two. If you've not got the second or third revisions of the test, that might account for your trouble.
I'm trying to install CUnit lib in my Ubuntu 10.04 LTS computer. I've installed it in a Ubuntu 11.04 without problems, but when I tried to install on 10.04 I got this trace:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/missing: Unknown `--run' option
Try `/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
---------- Disabling debug mode compilation.
++++++++++ Enabling automated(XML) mode compilation
++++++++++ Enabling basic mode compilation
++++++++++ Enabling console mode compilation
---------- Disabling curses mode compilation
---------- Disabling examples mode compilation
---------- Disabling test mode compilation
---------- Disabling memtrace functionality at compile time
---------- Disabling use of deprecated v1.1 names
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2':
configure: error: C compiler cannot create executables
See `config.log' for more details
I have tried a lot of libs and gcc versions, so I think that the problem is in Ubuntu, but where or why, I've no idea!
Relevant part of the log file:
configure:3399: checking whether the C compiler works
configure:3421: gcc -DRELEASE=#RELEASE# -Wall -W -pedantic -Wshadow -ansi -I/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/CUnit/Headers -L/home/cpcaserver5/Área de Trabalho/CUnit-2.1-2/CUnit/Sources conftest.c >&5
gcc: de: No such file or directory
gcc: Trabalho/CUnit-2.1-2/CUnit/Headers: No such file or directory
gcc: de: No such file or directory
gcc: Trabalho/CUnit-2.1-2/CUnit/Sources: No such file or directory
configure:3425: $? = 1
configure:3463: result: no
Full config.log >> http://pastebin.com/SrWfar1Z
I can compile C files just fine.
There's a quoting problem somewhere, and the fact that the directory you installed CUnit to contains spaces (and non-ASCII chars) is messing things up.
While it might be possible to make this work, I strongly suggest you change the installation directory to a path that does not contain any spaces at all, and stick to plain ASCII7 characters (no accents, llama, tilde or otherwise).
You'll run into lots of scripting problems if your paths are "unusual". If you want horizontal spacing, use an underscore (_).
Output from ./configure is notoriously unhelpful, except for one line:
See `config.log' for more details
That's where the real error messages are.
Trying to use automake/autoconf (versions 1.10 and 2.61, respectively). Everything is working OK, except automake is not generating Makefile.in.
There are some warnings generated, but I don't think they're significant. However, the last line makes me think it's generating something it shouldn't and stopping there. There is a md5.cc and md5.c file in the project.
xanadu:fsd wwilliam$ automake --add-missing
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:421: AC_USE_SYSTEM_EXTENSIONS is expanded from...
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/functions.m4:1677: AC_FUNC_STRNLEN is expanded from...
configure.ac:46: the top level
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:340: AC_GNU_SOURCE is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_AIX
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:455: AC_AIX is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_AIX
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_MINIX
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:474: AC_MINIX is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_MINIX
Makefile.am: object `md5.$(OBJEXT)' created by `md5.cc' and `md5.c'
Relevant contents of configure.ac:
AC_INIT(testapp, 1.1, user#blah.com)
AM_INIT_AUTOMAKE(testapp,1.1)
AC_OUTPUT(Makefile)
Contents of Makefile.am:
AUTOMAKE_OPTIONS = foreign
CFLAGS=-O2
bin_PROGRAMS = testapp
testapp_SOURCES = interface.cc interface.hh keymgr.cc keymgr.hh main.cc manage.cc manage.hh md5.c md5.cc md5.h mm.cc mm.hh mysqldb.cc mysqldb.h testapp.cc testapp.h
I've been googling the issue but haven't found anything helpful.
Commands run were:
autoscan
mv configure.scan configure.ac
(edit configure.ac)
autoconf
(edit Makefile.am)
aclocal
automake --add-missing
Anyone seen anything like this before or know perhaps how I could turn on some additional debugging to troubleshoot the problem?
Makefile.am: object `md5.$(OBJEXT)' created by `md5.cc' and `md5.c'
is an error message that causes Automake to abort. These two files would have to be compiled to md5.o, so that is a problem.
Can you rename one of these two files?
I have one program that I configure with automake. That program has a script to do the setup, which consists of:
aclocal -I config &&
libtoolize --automake &&
autoheader &&
automake --foreign --add-missing &&
autoconf
The difference, as I see it, is that in this the autoconf step is last, not in the middle.
It complains on line 46, which you do not provide to your question.
Anyhow, to fix this issue you have to add AC_USE_SYSTEM_EXTENSIONS in your configure.ac.
example:
AC_INIT(testapp, 1.1, user#blah.com)
AM_INIT_AUTOMAKE(testapp,1.1)
AC_OUTPUT(Makefile)
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_C
...