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.
Related
I am trying to build and install the OpenFst library on windows10 using MINGW64 with Msys but i got the following error during the building with make. I first used this command:
./configure --enable-grm --enable-far --enable-ngram-fsts MAKE="mingw32-make"
some of the checking results from this command generates no:
checking whether we are cross compiling... no
checking for sysroot... no
checking for a working dd... ./configure: line 7016: cmp: command not found
./configure: line 7016: cmp: command not found
checking for mt... no
checking if : is a manifest tool... no
checking for unistd.h... no
checking if gcc supports -fno-rtti -fno-exceptions... ./configure: line 8930: diff: command `not found`
checking whether to build static libraries... no
The other checking results are ok and yes. Then I used the make command:
mingw32-make
it works for some files then terminated by that error:
libtool: error: can't build x86_64-w64-mingw32 shared library unless -no-undefined is
specified
It is my first time to build with MinGW. So, I do not know what the error means and if the resulting "no" checking from the configuration responsible for it.
This is normal.
MinGW does not allow building shared libraries (DLLs) when there are still unresolved symbols, because on Windows each symbol referenced from a DLL must point to something that exists. On other platforms this is not always required.
So you should pass to -Wl,-no-undefined to gcc when linking.
For projects using autoconf's configure this is normally already done if it was a recent enough version of autoconf. Otherwise you may need to add LDFLAGS="-Wl,-no-undefined" to the configure line.
If that doesn't help you can try to change it in the libtool file generated by configure.
So specicially you can try this in MSYS/MSYS2 shell:
./configure LDFLAGS="-Wl,-no-undefined"
and if that doesn't work you can also try this (after the configure command and before running make):
sed -i.bak -e "s/\(allow_undefined=\)yes/\1no/" libtool
Other build tools like cmake, meson or scons already know how to build Windows DLLs and need no special treatment.
I tried to compile octave-4.0.0 source with JIT feature. First, I installed LLVM and enabled the JIT feature by configuring:
$ ./configure --prefix=/usr --enable-shared --enable-jit
But, I got these warnings:
configure: WARNING: llvm/IR/Verifier.h: present but cannot be compiled
configure: WARNING: llvm/IR/Verifier.h: check for missing prerequisite headers?
configure: WARNING: llvm/IR/Verifier.h: see the Autoconf documentation
configure: WARNING: llvm/IR/Verifier.h: section "Present But Cannot Be Compiled"
configure: WARNING: llvm/IR/Verifier.h: proceeding with the compiler's result
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: ## Report this to http://octave.org/bugs.html ##
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: Missing LLVM file TargetData.h. JIT compiler is disabled.
To solve the warning of missing LLVM file, I looked into LLVM's header files and found that TargetData.h not exist in /usr/include/llvm/target, so I manually copy the header file to the path. However, same warnings showed again when I'm reconfiguring.
Another warning (present but cannot be compiled) is also a problem for me.
Does anyone know how to deal with these two warnings? (I need to enable jit compiler in Octave)
P.S. I have tried using LLVM 3.7.0 and LLVM 3.5.0, both these two version don't install TargetData.h into Your Prefix/include/llvm/Target.
As mentioned in this link
http://www.delorie.com/djgpp/v2faq/faq8_20.html
How can I create a file where I can see the C code and its assembly translation together?
Res: If you want to see the C code together with the assembly it was converted to, use a command line like this:
gcc -c -g -Wa,-a,-ad [other GCC options] foo.c > foo.lst
I tried to make the same thing in the Mac OSX Yosemite terminal and received the following errors:
$ gcc -Wa,-a,-ad main.c > main.lst
clang: error: unsupported argument '-a' to option 'Wa,'
clang: error: unsupported argument '-ad' to option 'Wa,'
So, I'm looking for a way to generate a file with the assembly +source approach in the clang compiler, if there's one.
Thanks in advance.
I'm trying to install rpostgresql on a mac. I want to be able to connect to a server using an IP address and read the data into a dataframe. I downloaded the package from CRAN, and ran the following line:
install.packages('/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz', type='source')
This started to compile the package but resulted with the following error message:
> install.packages('/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz', type='source')
Installing package(s) into ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
* installing *source* package ‘RPostgreSQL’ ...
** package ‘RPostgreSQL’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pg_config... /usr/bin/pg_config
checking for "/usr/include/libpq-fe.h"... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
*** arch - x86_64
gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I/usr/include -I/usr/local/include -fPIC -g -O2 -c RS-DBI.c -o RS-DBI.o
make: gcc-4.2: No such file or directory
make: *** [RS-DBI.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RPostgreSQL’
Warning in install.packages :
installation of package ‘/Users/celenius/Downloads/RPostgreSQL_0.2-1.tar.gz’ had non-zero exit status
I've looked through advice on the rpostgresql webpage (1, 2) but a lot of the suggestions are more than a year old so I thought there might be more recent advice on how to install this package.
If you want to connect to a postgre db, you also can use RODBC. Just install an ODBC driver (Lion should already include that for postgres) and you are ready to go.
I do that for conecting to my local postgre / postgis server and it works just fine.
You need Xcode installed in order to compile. Go into the Mac app store and search for, then install Xcode. It's free.
you can tell whether you already have gcc by doing a quick which gcc-4.2. My guess is that you do not. After installing Xcode, you should get /usr/bin/gcc-4.2 in response.
****EDIT****
After the comments about how you installed Xcode and still don't have gcc-4.2, I did a little bit of reading and it looks like you need to do one of the options listed in this Stack Overflow question: Setting GCC 4.2 as the default compiler on Mac OS X Leopard
This makes me wonder where my gcc-4.2 came from. Probably some fortuitous accident when I first got my MBP.
Since postgresql is required to build the package from source, you will need to install it. The easiest way to do so, if you use homebrew, is to simply do the following in a Terminal:
## install postgresql
brew install postgresql
## install the R package
Rscript -e "install.packages('RPostgreSQL', type = 'source')"
## remove postgresql (optional)
brew remove postgresql
My problem:
I've been trying to compile, build, and install GCC 4.4.2 in my installation of OpenSolaris 2009.06 on my VirtualBox 3 i386 machine. But I keep getting this same error when running make:
> checking whether ln -s works... yes
checking for i386-pc-solaris2.11-gcc... /src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/xgcc -B/src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/ -B/usr/gnu/i386-pc-solaris2.11/bin/ -B/usr/gnu/i386-pc-solaris2.11/lib/ -isystem /usr/gnu/i386-pc-solaris2.11/include -isystem /usr/gnu/i386-pc-solaris2.11/sys-include
checking for suffix of object files... configure: error: in `/src/gcc-4.4.2/i386-pc-solaris2.11/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/src/gcc-4.4.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/src/gcc-4.4.2'
make: *** [all] Error 2
Attempted solutions:
I tried the answer to this question:
Problem compiling gcc 4.4.0 on OpenSolaris 2009.6 i.e.
./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-gnu-ld
I tried GNU GCC's platform specific solution:
GNU Solaris specific build instructions
i.e.
./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared
I am still getting the same errors despite running ./configure with the two solutions above
Any help would be appreciated!
Thanks!
Can you compile programs with the existing GCC?
If not, you need to resolve that.
If you can, then you need to look at that monstrous 7-argument command (the one where it says 'checking for i386-pc-solaris2.11-gcc' - why those 7 arguments?).
Are you running 'make bootstrap'?
If not, what happens when you do?
If so, whereabouts in the processing is it? (Is this stage 1, or stage 2, or what?)
Are you using the recommended setup, with the source for GCC in, say, /src/gcc-4.4.2 and the object files in, say, /src/gcc-4.4.2-obj?
If not, do so. Use: cd /src/gcc-4.4.2-obj; ../gcc-4.4.2/configure ...
Which shell do you use?
On regular Solaris 10 (not OpenSolaris - and SPARC, not Intel), I have to set CONFIG_SHELL=/bin/ksh in the environment to make things compile (by default, it uses /bin/sh, but the /bin/sh on Solaris 10 is Bourne shell and there's a script deep down in the Java section (IIRC) that uses Bash/Korn/POSIX shell notations like $(cmd ...)). However, that normally affects a much later stage in the processing.
However, I have got GCC 4.4.2 on Solaris 10 without problem (using GCC 4.4.1 as the bootstrap compiler).