Let me first of all apologize in case the question is unnecassary, but I am very new to modifiying compilers and cross architectural designs.
In order to evaluate the performance on various platforms I have been trying to compile the Z3 SMT solver on a raspberry pi 2. However there seems to be a problem due to the arm architecture. My intention so far was to use the configure script supplied by Mircrosoft Research, which works neatly and produces the following outcome:
Testing ar...
Testing g++...
Testing gcc...
Testing OpenMP...
Host platform: Linux
C++ Compiler: g++
C Compiler : gcc
Arithmetic: internal
OpenMP: True
Prefix: /usr
64-bit: False
Python version: 2.7
Writing build/Makefile
Copied Z3Py example 'example.py' to 'build'
Makefile was successfully generated.
python packages dir: /usr/lib/python2.7/dist-packages
compilation mode: Release
Type 'cd build; make' to build Z3
When building I first of all encouter the problem:
src/shell/install_tactic.cpp
cc1plus: error: unrecognized command line option '-mfpmath=sse'
cc1plus: error: unrecognized command line option 'u2018-msse'
cc1plus: error: unrecognized command line option 'u2018-msse2'
Makefile:3159: recipe for target 'shell/install_tactic.o' failed
make: *** [shell/install_tactic.o] Error 1
If I understood the meaning of this error correctly, these commad line options refer to clever tatics used to compute mathematical exercises and are not necessary if performance is not an issue. (Simply speaking, it should still work, even if it is slower).Removing the flags from the respective config.mk, allows building to a certain extend.
After sucessfully producing a lot of outcome files, the make process terminates with the following error:
src/util/hwf.cpp
../src/util/hwf.cpp:55:23: fatal error: emmintrin.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
Makefile:163: recipe for target 'util/hwf.o' failed
make: *** [util/hwf.o] Error 1
My question now is, whether it is again possible to compile without using emmintrin.h (simply copying the missing library to the Pi does not work, due to architectural hurdles). Has anyone ever done this?
Thank you in advance for all you helpful comments.
Both, the unsupported options and the error in hwf.cpp refer to the support for floating-point operations in Z3. The options are trying to make sure that the floating-point unit is set up correctly, and the error in hwf.cpp is because we're trying to get to hardware intrinsics for floating point operations. Essentially, the consequences of those changes are that some floating-point operations may be imprecise if those options are removed; however, not many pieces of Z3 rely on that, so it's unlikely you'll see errors later.
I do have a RPi at home, so I'll see whether we can use different options for that when I get home tonight. It may be that the RPi doesn't have a floating point unit at all though, in that case I'll have to switch it to soft floats (which we also have support for, but it may be slower).
Related
I am using Einstein toolkit on Windows via Cygwin.
When I use carpet driver, I have found errors because of HDF5 library.
I installed following packages;
curl,perl,subversion,git,gcc-{core,fortran,g++},make,patch,libjpeg-devel,openssl-devel,xgraph,vim.
It's working well with PUGH but CARPET is not working.
Kindly,tell me how I can fix it.
The errors:
/home/hp/cactus/configs/carpet/build/CarpetLib/limits.cc:
In function ‘void CarpetLib::set_system_limits()’:
/home/hp/cactus/configs/carpet/build/CarpetLib/limits.cc:27:13:
error: ‘RLIMIT_RSS’ was not declared in this scope set_limit(RLIMIT_RSS, "resident set size", max_memory_size_MB);
/home/hp/cactus/configs/carpet/build/CarpetLib/limits.cc:27:13:
note: suggested alternative: ‘RLIMIT_AS’ set_limit(RLIMIT_RSS, "resident set size", max_memory_size_MB);
Running configuration script for thorn MPI:
MPI selected, but MPI_DIR is not set.
Computing settings... Found MPI compiler wrapper at /usr/bin/mpic++! Successfully configured MPI.
Finished running configuration script for thorn MPI.
make[3]: *** [/home/hp/cactus/configs/carpet/config-data/make.config.rules:281: limits.cc.o] Error 1
make[2]: *** [/home/hp/cactus/lib/make/make.thornlib:113: make.checked] Error 2
make[1]: *** [/home/hp/cactus/lib/make/make.configuration:179: /home/hp/cactus/configs/carpet/lib/libthorn_CarpetLib.a] Error 2
make: *** [Makefile:263: carpet] Error 2
This was reported in 2013:
The warnings that are reported are harmless, since the content of the file does not matter -- what only matters is that there is at least one file generated when the self-test succeeds.
In general, scheduling a routine into a non-existing schedule bin means that this routine is not executed.
In many cases, this is just the right thing to do. In other cases, this is e.g. due to an error in schedule.ccl, which is why we moved from "silently not scheduling" to reporting warnings about these.
In this case, the warnings are harmless and no need to worry, since the thorns Boundary and SymBase are not actually required by CartGrid3D. One wishes there was a way to indicate this in the schedule.ccl so that these warnings could be omitted.
Regarding the use of CARPET, et the errors related to HDF5, here are all the current issues for the component CARPET with HDF5 in its description
A similar error was seen in this thread.
It illustrates that the error messages before the make/Error lines could help knowing what is going on.
I am using the --fast flag the first time I tried I got this error
warning: --specialize was set, but CHPL_TARGET_CPU is 'unknown'.
If you want any specialization to occur please set CHPL_TARGET_CPU to a proper value.
so I input this command
export CHPL_TARGET_CPU=aarch64
since it is the architecture of my Jetson Nano board
then I got this error:
/home/chico/chapel-1.20.0/third-party/gasnet/Makefile.setup:6: /home/chico/chapel-1.20.0/third-party/gasnet/install/linux64-gnu-aarch64-none/substrate-udp/seg-everything/nodbg/include/udp-
conduit/udp-par.mak: No such file or directory
make: *** No rule to make target '/home/chico/chapel-1.20.0/third-party/gasnet/install/linux64-gnu-aarch64-none/substrate-udp/seg-everything/nodbg/include/udp-conduit/udp-par.mak'. Stop
.error: compiling generated source
I do not get an executable after trying to compile my code.
This error is a (poor) indication that the Chapel runtime has not been built for your current CHPL_* configuration, where in this case, the change to CHPL_TARGET_CPU is the issue. If you do cd $CHPL_HOME && make (or gmake) while CHPL_TARGET_CPU is still set, the runtime will be rebuilt for your current settings and when recompiling the Chapel program, the error should go away.
Note that multiple builds of Chapel can co-exist simultaneously with different CHPL_TARGET_CPU settings.
Disclaimer: I am new here, I've done my best to follow the posting guidelines so please let me know if this needs any extra information. I am also relatively new to Linux development.
Background:
I am in the process of building a library using ActiveMQ-cpp on Linux. I have built and run it successfully on the host Ubuntu PC, but attempting to cross-compile it for the target ARM-based machine is producing some very abstruse errors.
The first step involves building APR (http://apr.apache.org/) using the arm-linux-gcc compiler. After some research, the following command runs the configuration script with little fuss:
CC=/usr/local/arm-linux/bin/arm-linux-gcc ./configure --prefix=/root/apr-arm --host=arm-linux cross_compiling=yes ac_cv_file__dev_zero=no ac_cv_func_setpgrp_void=no apr_cv_tcp_nodelay_with_cork=no apr_cv_process_shared_works=no
This allows the next step - running the makefile.
Current Issue: Entering make on the command line exits prematurely at the following line:
[...]
/root/.local/share/Trash/files/apr-1.5.1/build/mkdir.sh include/private
tools/gen_test_char > include/private/apr)escape_test_char.h
/bin/bash: tools/gen_test_char: cannot execute binary file
make[1]: *** [include/private/apr_escape_test_char.h] Error 126
make[1]: Leaving directory `/root/.local/share/Trash/files/apr-1.5.1'
make: *** [all-recursive] Error 1
Attempted Fixes: A solution to the following question, posted by the asker, has not worked. It is possible that I've not followed the process correctly (Apache Cross Compilation Error ./gen_test_char: cannot execute binary file)
In the same theme, I tried temporarily removing the problem gen_test_char program from its directory but the clever script just rebuilds it.
My aim is to either avoid this error and continue the build process on Ubuntu, or perhaps consider other means of building the library. I have built it with no trouble in VS2013 on Windows, so if it is possible to cross compile that project for ARM architectures I would happily go ahead with that.
APR need gen_test_char to be compiled for system not for arm, why you got "bin/bash: tools/gen_test_char: cannot execute binary file" error because make program is going to execute gen_test_char on your system and if you cross compile then every time you got this error.
To avoid this error please follow below steps:
1) Cross compile APR which is going to fail
2) compile APR for system and copy gen_test_char to cross compiled APR's directory.
3) Again cross compile
After performing above steps you should not get "cannot execute binary file" error.
Cross compile APR which is going to fail
compile APR for system and copy gen_test_char to cross compiled APR's directory.
change the name of gen_test_char to gen_test_char_host
in Makefile file change the name of gen_test_char to gen_test_char_host because make creates it again.
Again cross compile
you may see some struct redefinition which needs to find the file and comment the redefined struct manually.
I'm trying to create postgresql plugin for Symbian device but I can't compile it. I'm working on Windows 7 64bit.
I did everything according to this article: http://doc.qt.io/archives/qt-4.7/sql-driver.html#qpsql
C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\psql>qmake "INCLUDEPATH+=C:\Program Files (x86)\PostgreSQL\8.3\include" "LIBS+=C:\Program Files (x86)\PostgreSQL\8.3\lib\libpq.lib" psql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.
So, it looked OK. Then...
C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe is not recognized as an internal or external command, operable program or batch file.
make: *** [debug-gcce] Error 9009
I noticed, that sbs_home was set to python directory but it was not in the path, then the make could not find the script raptor_start.py:
C:\...drivers\psql>echo %sbs_home%
C:\QtSDK\Symbian\tools\sbs\win32\python27
C:\...drivers\psql>set path=%path%;%sbs_home%
C:\...drivers\psql>C:\QtSDK\Symbian\tools\sbs\win32\mingw\bin\make debug-gcce
sbs -c arm.v5.udeb.gcce4_4_1
python.exe: can't open file C:\QtSDK\Symbian\tools\sbs\win32\python27\python\raptor_start.py': [Errno 2] No such file or directory
make: *** [debug-gcce] Error 2
C:\...drivers\psql>set sbs_home=C:\QtSDK\Symbian\tools\sbs
so, when I started compiling I got this error:
C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/include/stdapis/stlportv5/stl/_istream.c:650: warning: suggest parentheses around '&&' within '||' target : epoc32\release\armv5\udeb\qsqlpsql.dll [arm.v5.udeb.gcce4_4_1]
FAILED linkandpostlink for arm.v5.udeb.gcce4_4_1: epoc32\release\armv5\udeb\qsqlpsql.dll
mmp: qsqlpsql_dll.mmp
c:/qtsdk/symbian/tools/gcce4/bin/../lib/gcc/arm-none-symbianelf/4.4.1/../../../../arm-none-symbianelf/bin/ld.exe: warning: C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/usrt3_1.lib(ucppinit.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail
C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/build/psql/c_8d95259b570e1766/qsqlpsql_dll/armv5/udeb/qsql_psql.o: In function `qMakeError': C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:175: undefined reference to `PQerrorMessage'
....many undefined references...
C:/QtSDK/QtSources/4.8.1/src/sql/drivers/psql/qsql_psql.cpp:117: undefined reference to `PQfreemem'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [C:/QtSDK/Symbian/SDKs/Symbian3Qt474/epoc32/release/armv5/udeb/qsqlpsql.dll] Error 1
sbs: error: The make-engine exited with errors.
sbs : warnings: 3
sbs : errors: 2
built 'arm.v5.udeb.gcce4_4_1'
Run time 5 seconds
sbs: build log in C:\QtSDK\Symbian\SDKs\Symbian3Qt474\epoc32\build\Makefile.2012-06-26-15-03-12.78-2996.log
make: *** [debug-gcce] Error 1
Has anybody idea, what with it?
You are trying to build an Symbian/ARM application using precompiled binary postgresql client library for Windows. This won't ever work. The instructions you refer to only show how to build for OS X, Unix and Mac targets natively. You're cross compiling for Symbian.
You'd first need to obtain a binary version of the postgresql client library compiled for Symbian. It might exist out there, or you may need to compile it yourself. I don't think that the library supports Symbian as a target, and I couldn't readily find any Symbian ports for download. You may be out of luck for a trivial solution. A port might not be entirely out of the question, though -- perhaps the platform-specific code is localized enough.
I am following the instructions here for cross-compiling GCC. I am on a mac. When I run this command from the gcc source folder: ./configure --target=i586-elf --prefix=/usr/local/cross --disable-nls --without-headers --enable-languages=c,ada,c++,fortran,java,objc,obj-c++,treelang I get this error: configure: error: GMP 4.1 and MPFR 2.2.1 or newer versions required by fortran. When I change the command to this (I couln't compile GMP): ./configure --target=i586-elf --prefix=/usr/local/cross --disable-nls --without-headers --enable-languages=c,ada,c++,java,objc,obj-c++,treelang I get this error:
The following requested languages could not be built: ada
Recognised languages are: c,ada,c++,fortran,java,objc,obj-c++,treelang
which doesn't make sense to me because it says ada is recognized. All other configurations of the enable-languages settings (and when the setting isn't changed and the default is used) give me this error:
/usr/local/cross/i586-elf/bin/ranlib ./libgcov.a
_error_not_here_yet - havent even thought about it - it may even work
make[1]: _error_not_here_yet: Command not found
make[1]: *** [treelang.all.cross] Error 127
make: *** [all-gcc] Error 2
How can I cross compile GCC?
Are you running configure from the gcc source tree? If so: don't do that. Follow the instructions (verbatim) in the page you linked to.
Look carefully and you'll notice that they're running the configure command from outside the gcc source tree.
If your platform is supported by it, the crosstool script (also linked from the bottom of your instructions page) is very helpful.
Edit: As potatoswatter points out in a comment, your installation is probably hosed at this point. Remove the whole tree and start from scratch. (It sounds like it will take too long, and you'll want to take a short cut, but it will be faster in the end if you just start from scratch now.)