gem5 build error config_embedded_python.<locals>.flag_filter() takes 2 positional arguments but 3 were give - gem5

I am trying to install gem5 on a macos M2 and use 1d03f6de941520860c673b5f7954c82a46e8b191
when I try use
scons build/NULL/gem5.opt -j 5
scons: Reading SConscript files ...
Mkdir("/Users/liyang/YangL/gem5/build/NULL/gem5.build")
Checking for linker -Wl,--as-needed support... no
Checking for compiler -Wno-c99-designator support... yes
Checking for compiler -Wno-defaulted-function-deleted support... yes
Checking for compiler -gz support... yes
Checking for linker -gz support... yes
Info: Using Python config: python3-config
TypeError: config_embedded_python..flag_filter() takes 2 positional arguments but 3 were given:
File "/Users/liyang/YangL/gem5/SConstruct", line 530:
config_embedded_python(env)
File "/Users/liyang/YangL/gem5/SConstruct", line 329:
env.ParseConfig(cmd, flag_filter)
File "/opt/homebrew/Cellar/scons/4.4.0/libexec/lib/python3.10/site-packages/SCons/Environment.py", line 1674:
return function(self, self.backtick(command), unique)
make: *** [run] Error 2
I can not build success
I am not sure how to fix this error or even why this error is occurring; I don't even really know what this error is saying. Any help would be appreciated.

The error is saying that the flag_filter function is being given 3 arguments, but it is only expecting 2. Not sure why that is happening, but you could try downgrading to scons 3.0.1.

I faced the same error. It was due to two different versions of scons on my system. By default, gem5 was running with the latest version of scons i.e., 4.4.0 present in the home/.local. Using version 3.1.2 present in /usr/bin/scons fixed the issue for me.

Related

Version number mismatch: inconsistency between gmp.h and libgmp

I was trying to install NTL library on ubuntu, and after using "make", I get this error :
GMP version check (6.0.0/6.1.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
makefile:346: recipe for target 'setup3' failed
make[1]: *** [setup3] Error 134
make[1]: Leaving directory '/mnt/c/Users/pc-admin/ntl-11.0.0/ntl-11.0.0/src'
makefile:310: recipe for target 'setup-phase' failed
make: *** [setup-phase] Error 2
I saw the posts
https://gmplib.org/list-archives/gmp-discuss/2009-March/003663.html
http://www.mpfr.org/faq.html#undef_ref1
But still that didnt quite help.
Currently my usr/local/lib has
XXX#SECURE2:/usr/local/lib$ ls
libgmp.a libgmp.so libgmp.so.23.0.3 libmpfr.la libmpfr.so.6 libmpir.a libmpir.so libmpir.so.23.0.3 python3.5
libgmp.la libgmp.so.23 libmpfr.a libmpfr.so libmpfr.so.6.0.1 libmpir.la libmpir.so.23 pkgconfig
and /usr/local/include has
XXX#SECURE2:/usr/local/include$ ls
gmp.h mpf2mpfr.h mpfr.h mpir.h
Tried changing environment paths as
C_INCLUDE_PATH=usr/local/include
LIBRARY_PATH=usr/local/lib
LD_LIBRARY_PATH=usr/local/lib
Somehow I don't understand how to solve. Any help would be highly appreciated! Thanks for your patience
I encountered this problem today when I installed GMP after NTL Makefile lets me do so.
The following command seems to help:
sudo ldconfig
I met the same problem.It was because of the library's version.
First I installed gmp-6.1.2(using configure,make,make install command),and then I downloaded ntl-11.3.2,input configure and make commands.And the problem appeared:
GMP version check (6.1.2/6.1.0)
*** version number mismatch: inconsistency between gmp.h and libgmp
Aborted (core dumped)
makefile:353: recipe for target 'setup3' failed
I guessed maybe I need to install gmp 6.1.0.So I first entered gmp-6.1.2 directory,using command sudo make uninstall,then downloaded gmp-6.1.0 and the problem was solved.
Maybe you can have a try uninstalling gmp 6.0.0,installing 6.1.0.
I figured out a solution, start again and let the Wizard figure it out.
First, get rid of everything we did before
make clobber
./configure
Then edit the makefile and enable the wizard (around line 128)
#WIZARD=off
WIZARD=on

'brew install cmake' gives 'InsecurePlatformWarning'

on mac OSX 10.9.5 (Mavericks)
$brew install cmake
gives
==> Using the sandbox
==> Downloading https://cmake.org/files/v3.8/cmake-3.8.0.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/cmake-3.8.0.tar.gz
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/3.8.0 --no-system-libs --parallel=8 --datadir=/share/cmake --docdir=/sh
==> make
Last 15 lines from /Users/me/Library/Logs/Homebrew/cmake/02.make:
[100%] Linking CXX executable ../bin/ctest
[100%] Built target ctest
Scanning dependencies of target documentation
[100%] sphinx-build man: see Utilities/Sphinx/build-man.log
Exception occurred:
File "/usr/local/Cellar/sphinx-doc/1.5.5/libexec/lib/python2.7/site-packages/sphinx/util/requests.py", line 52, in <module>
requests.packages.urllib3.exceptions.InsecurePlatformWarning)
AttributeError: 'module' object has no attribute 'InsecurePlatformWarning'
The full traceback has been saved in /tmp/sphinx-err-FKTGTI.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[2]: *** [Utilities/Sphinx/doc_format_man] Error 1
make[1]: *** [Utilities/Sphinx/CMakeFiles/documentation.dir/all] Error 2
make: *** [all] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
glew 2.0.0: add "--with-cmake" option https://github.com/Homebrew/homebrew-core/pull/12722
qt5: cmake find_package(Qt5Core) doesn't work when linked to /usr/local https://github.com/Homebrew/homebrew-core/issues/8392
Error: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
Error: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
why am i getting this error?
A search for this on SO led me to this page which says 'This happens on Python 2 platforms that have an outdated ssl module. '
I am using Python 2.7.13. I followed this page and issued:
pip install urllib3[secure]
but I still get the same error.
turns out make 3.8 is not compatible w mavericks. i upgraded to el capitan and it installed without a hiccough.

CMake build failed with error 'SecTrustEvaluateAsync' undeclared when using gcc 5.3 on OS X

I am trying to build CMake 3.5.2 from source on Mac El Captain using GNU GCC 5.3 from HPC.
The ./bootstrap process is completed successfully but when i am using make is failing with the following error.
/Users/dev/Downloads/CMake-master/Utilities/cmcurl/lib/vtls/darwinssl.c: In function ‘darwinssl_connect_step3’:
/Users/dev/Downloads/CMake-master/Utilities/cmcurl/lib/vtls/darwinssl.c:1999:6: error: ‘SecTrustEvaluateAsync’ undeclared (first use in this function)
if(SecTrustEvaluateAsync != NULL) {
^
/Users/dev/Downloads/CMake-master/Utilities/cmcurl/lib/vtls/darwinssl.c:1999:6: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vtls/darwinssl.c.o] Error 1
make[1]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/all] Error 2
make: *** [all] Error 2
The same process worked fine when I was using the default clang compiler provided with Mac OS.
When I tried finding about SecTrustEvaluateAsync I found the following information in the apple site.
Any help on this is highly appreciated.
You might try the latest CMake 3.6-rc1. If the problem persists, file a bug to notice the CMake developers. We probably won't fix CMake's code.

valgrind installation make error __longjmp_chk already defined

I am trying to install valgrind 2.2.0 on ubuntu 10.04 having glibc 2.11. I have used valgrind doesn't accept newest version of glibc link. While make i am getting some error. The last 10 lines appearing on screen are
vg_libpthread.c:314: note: expected ‘const Char *’ but argument is of type ‘char *’
vg_libpthread.c:3292: warning: pointer targets in passing argument 4 of ‘my_assert_fail’ differ in signedness
vg_libpthread.c:314: note: expected ‘const Char *’ but argument is of type ‘const char *’
/tmp/ccGHnzp9.s: Assembler messages:
/tmp/ccGHnzp9.s:2463: Error: symbol `__longjmp_chk' is already defined
make[4]: *** [vg_libpthread.o] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2
/tmp/ccGHnzp9.s file doesnt exist. I am unable to find whats wrong.
Thank you.
I am trying to install valgrind 2.2.0 on ubuntu 10.04
Valgrind 2.2.0 is ancient (Released on 31 August 2004) and can't be built without much hacking on a recent Linux system.
I can't think of any good reason to attempt building that particular Valgrind version either. Just use a newer release (current release builds just fine on ubuntu 10.04 without any hacks).

Compiling GDC on Windows -- where to get GMP and MPFR dependencies?

I'm trying to compile GDC (v2) on Windows 7, using MinGW's MSYS.
When I get to this step:
$ ../configure --enable-languages=d --disable-shared --disable-bootstrap
I get:
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
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 ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
This made me look back at the instructions, which noted that it needs these libraries:
libgmp3-dev
libmpfr-dev
libmpc-dev
So now the question is, where do I find these headers and/or libraries? I've searched all over for libgmp3-dev, but I can't find anything for Windows. (I'm still in the learning process for *nix, so I'm not too familiar with anything.)
Thanks!
Update:
So I tried to make MPFR (I don't even know if it was the right version), and I got this error:
$ make install
Making install in tests
[...]
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /bin/install -c libmpfr.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libmpfr.lai /usr/local/lib/libmpfr.la
libtool: install: /bin/install -c .libs/libmpfr.a /usr/local/lib/libmpfr.a
libtool: install: chmod 644 /usr/local/lib/libmpfr.a
libtool: install: ranlib /usr/local/lib/libmpfr.a
/bin/sh: /home/Home: No such file or directory
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/Home User/mpfr-2.4.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/Home User/mpfr-2.4.2'
make: *** [install-recursive] Error 1
Any ideas?
From https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile :
ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2
http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.bz2
http://gmplib.org/
http://www.mpfr.org/
Just download the source tarballs. As for building these, I don't remember the details (the instructions should be clear on this) but I know you can put these GMP and MPFR in the source tree with GCC and the GCC build process will automatically take care of building these. This may be easier than building/installing/setting environment variables for them as a discrete step.
I always use this for building gdc on Windows: http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
The error message you posted has the links to find the libraries. You might need to download their source code and compile them, but they are both easy to build.