Error while "make"ing OMNet5.4 in Win10 64bit (1803) - makefile

I did as the installation guide said:
"./configure", everything was fine;
"make", i got the following errors :
===== Compiling sim ====
YACC: expr.y
LEX: expr.lex
MSGC: sim_std.msg
make[2]: *** [Makefile:155:sim_std_m.cc] error 127
make[1]: *** [Makefile:118:sim] error 2
make: *** [Makefile:28:allmodes] error 2
PS:
The MD5 of "omnetpp-5.4-src-windows.zip" checks out;
Already tried with WinRAR and 7-zip to unzip, got same errors at the same stage;
Full path does not contain any space;
Even tried to install "omnetpp-5.3-src-windows.zip", got same errors at the same stage;
Also tried to install omnet++ with and without JDK(Java SE 10.0.1) + Mingw(or cygwin) installed, got same errors at the same stage;
Even tried to update the MSYS2 inside the omnet directory, then "./configure; make clean; make", got same errors at the same stage;
Already disable the Windows Defender;
I do exactly as installation guide says: run "./configure", "make (clean)" and other things in "mingwenv.cmd".
also tried to enable gcc instead of clang, same error;
I don't know what to do.
-------update-------
I reset my Win10, and then, first thing to do is try to install OMNet after the OS "come alive". Finally, it is OK.
Sorry i did not try any further. Thank you all.

Related

Compiling Elmer FEM on macOS Mojave causes the fatal error: 'string.h' file not found

I'm trying to follow these instructions to compile Elmer FEM on macOS Mojave Version 10.14.6. However, when running the make install I get the error message:
.../elmerfem/umfpack/src/umfpack/include/umf_internal.h:29:10: fatal error: 'string.h' file not found
#include <string.h>
^~~~~~~~~~
1 error generated.
make[2]: *** [umfpack/src/umfpack/umfpack_zl_save_symbolic.c] Error 1
make[2]: *** Deleting file `umfpack/src/umfpack/umfpack_zl_save_symbolic.c'
make[1]: *** [umfpack/src/umfpack/CMakeFiles/umfpack.dir/all] Error 2
make: *** [all] Error 2
searching the internet this post suggests
xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools/
which had already been done before in my case and have no effect on the above error. This and this post suggest
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / -allowUntrusted
which leads to the error message
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
I would appreciate it if you could help me know what is the problem and how I can resolve it. Thanks for your kind support in advance.
P.S.1. As was asked here, my make version is GNU Make 3.81.
P.S.2. the list of string.h files on my hard drive here.
P.S.3. the output of CMake is pasted here.
OK, I think I solved the problem. From here, I ran
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ ..
while being inside the build folder. and then make . worked fine except some warning. I'm still not sure what was the problem or if this is the optimal/canonical solution. So I will not mark this as the accepted solution until others provide better ones.
P.S.1. I sent a pull request here on Elmer's HomeBrew formula as well.
P.S.2. To compile with OpenMP and MPI:
cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 -DWITH_Mumps=FALSE -DWITH_MPI=TRUE -DWITH_OpenMP=TRUE -DWITH_MKL=FALSE -DWITH_ELMERGUI=TRUE -DWITH_ELMERPOST=FALSE -DWITH_ELMERGUITESTER=FALSE ..
I have GNU GCC and OpenMPI installed via HomeBrew brew install gcc open-mpi.
P.S.3. If you want the ElmerGUI also installed:
install qt4 with brew install cartr/qt4/qt#4 from here
install qwt with brew install cartr/qt4/qwt-qt4
then cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/9.2.0_3/bin/g++-9 -DWITH_Mumps=FALSE -DWITH_MPI=TRUE -DWITH_OpenMP=TRUE -DWITH_MKL=FALSE -DWITH_ELMERGUI=TRUE -DWITH_ELMERPOST=TRUE -DWITH_ELMERGUITESTER=TRUE -DQWT_INCLUDE_DIR=/usr/local/Cellar/qwt-qt4/6.1.3_1/lib/qwt.framework/Versions/6/Headers/ ..

Booting xv6 on macbook OSX High Sierra (10.13.3)

I am following the instructions in the most popular answer to the post here and when I attempt to run
make TOOLCHAIN=i386-elf- qemu
it refuses to run giving me the following error...
***
*** Error: Couldn't find an i386-*-elf version of GCC/binutils.
*** Is the directory with i386-jos-elf-gcc in your PATH?
*** If your i386-*-elf toolchain is installed with a command
*** prefix other than 'i386-jos-elf-', set your TOOLPREFIX
*** environment variable to that prefix and run 'make' again.
*** To turn off this error, run 'gmake TOOLPREFIX= ...'.
***
gcc -m32 -gdwarf-2 -Wa,-divide -c -o usys.o usys.S
clang: error: unsupported argument '-divide' to option 'Wa,'
make: *** [usys.o] Error 1
I am unsure how to resolve this and unsure where to find the texinfo that the person was refering to in their answer to the linked post. I am also unsure where i386 installed itself. I am aware that I am omitting the -nox command from the command line instruction, but I tried that as well. We have setup a window manager for xv6 that works properly and I was wanting to be able to run it on my machine but cannot get it to work.
Thanks for any help!

Using mingw-w64 and ./configure --host=i686-w64-mingw32.static, make fails and Makefile CC variable looks wrong

I am new to compiling.
I am trying to compile iperf3 for Windows 10 because there is no official Windows distribution of iperf3 and for the learning experience. I am trying to do so on the new Windows Subsystem for Linux feature via Bash on Ubuntu on Windows, also for the learning experience.
I installed mingw-w64, which should give me the proper compiler and environment necessary for cross-compiling:
sudo apt-get install mingw-w64
This put two directories into my /usr directory:
i686-w64-mingw32
x86_64-w64-mingw32
It also put a bunch of things that look like compilers into /usr/bin.
I unzipped the .tar.gz file from iperf3 and navigated into it. Then, I run ./configure --host=i686-w64-mingw32.static and it completes without errors.
I note that the output of the command has a worrisome line: checking for i686-w64-mingw32.static-gcc... no
I note that the Makefile's CC variable is set to gcc, which doesn't sound like the proper compiler.
Then, I run make. It fails with errors:
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3] Error 1
make[2]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make: *** [all-recursive] Error 1
I also see the line: libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only
I think that the ./configure is not working correctly since it appears to have not found the right compiler for my --host argument and put it in the Makefile.
What am I doing wrong?
EDIT:
I changed the command to ./configure --host=i686-w64-mingw32 per comments and it completes without error. But no makefile is created so make yields make: *** No targets specified and no makefile found. Stop.
What am I doing wrong, now?
EDIT 2:
Looks like the ./configure actually is failing. Last line of its output is nanosleep() required for timing operations., which seems to mean that its missing a library for nanosleep.
How do I get nanosleep?
mingw doesn't support nanosleep. So programs using it cannot be compiled using mingw-w64.

Clion and CMake fail after updating to xcode 8

I get the following error after updating to xcode 8 and I'm not sure how to fix.
Error:The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/username/Library/Caches/CLion2016.2/cmake/generated/CacheBack-27c25a9c/27c25a9c/__default__/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_e91e5/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_e91e5.dir/build.make CMakeFiles/cmTC_e91e5.dir/build
Building C object CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o -c /Users/username/Library/Caches/CLion2016.2/cmake/generated/CacheBack-27c25a9c/27c25a9c/__default__/CMakeFiles/CMakeTmp/testCCompiler.c
cc: error: unable to find utility "clang", not a developer tool or in PATH
make[1]: *** [CMakeFiles/cmTC_e91e5.dir/testCCompiler.c.o] Error 72
make: *** [cmTC_e91e5/fast] Error 2
CMake will not be able to correctly generate this project.
Please check
xcode-select -p, make sure it points to Xcode 8 installation and run xcode-select --install after that.
I had to accept the license dialog after starting Xcode to get the updated components. After that I restarted Clion and it worked.

error while compiling gcc

I'm trying to compile gcc-code-assist which has the code completion feature in order to use it with emacs. However i have been getting this error message while compilinng
checking for exception model to use... configure: error: unable to detect exception model
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/dev/workspace/trash/gcc-code-assist-0.1-4.4.4'
make: *** [all] Error 2
I'm running Ubuntu 12.04 64bit
what can i do to overcome this problem
I found the right way to compile it ...
I really didn't have much knowledge of how to compile gcc (my first time)
after reading through the FAQ of building gcc I found the problem.
it turned out that I had to run the configure script and make from outside the source directory
( I called it gcc-build) so the directory list looked like this
gcc-source/
gcc-build/
then everything compiled smoothly
here's the link to the FAQ http://gcc.gnu.org/wiki/FAQ#configure

Resources