Unbound value Mirage.load when executing make depend - ocaml

I'm trying to compile and build this simple Unikernel project https://github.com/MagnusS/mirage-stats-demo under Ubuntu 14.04 with latest versions of OCaml, OPAM and related packages, but when I execute the command make depend the following error appears:
make -C manifest
make[1]: Entering directory /home/osboxes/dev/mirage-stats-demo/manifest'
ocamlbuild manifest.native -pkgs unix,bytes,mirage
+ /usr/bin/ocamlc.opt -c -I /home/osboxes/.opam/system/lib/bytes -I
/home/osboxes/.opam/system/lib/cmdliner -I/home/osboxes/.opam/system/lib/fmt -I /home/osboxes/.opam/system/lib/functoria -I /home/osboxes/.opam/system/lib/ipaddr -I /home/osboxes/.opam/system/lib/mirage -I /home/osboxes/.opam/system/lib/ocamlgraph -I /home/osboxes/.opam/system/lib/result -I /home/osboxes/.opam/system/lib/rresult -I /home/osboxes/.opam/system/lib/sexplib -I /usr/lib/ocaml -o manifest.cmo manifest.ml
File "manifest.ml", line 187, characters 12-23:
Error: Unbound value Mirage.load
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
as the working directory does not look like an ocamlbuild project (no
'_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
you should add the option "-r" or create an empty '_tags' file.
To enable recursive traversal for some subdirectories only, you can use the
following '_tags' file:
true: -traverse
<dir1> or <dir2>: traverse
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:01.
make[1]: *** [all] Error 10
make[1]: Leaving directory `/home/osboxes/dev/mirage-stats-demo/manifest'
make: *** [manifest/manifest.native] Error 2

Related

codelite unittest++/UnitTest++.h: no such file or directory

I am trying to do unit testing with C++/Codelite. I have UnitTest++ plugin installed from codelite-plugins package (Ubuntu 18.04). I can also see this:
$ ls -la /usr/include | grep Unit
drwxr-xr-x 3 root root 4096 Mar 2 11:47 UnitTest++
$ sudo dpkg -l | grep unittest++
ii libunittest++-dev 2.0.0-2 amd64 unit testing framework for c++, static library and headers
ii libunittest++2:amd64 2.0.0-2 amd64 unit testing framework for c++, runtime library
So I create a test project in Codelite and I add this:
#include <unittest++/UnitTest++.h> // This line and main are auto-created
TEST(SanityTest)
{
CHECK_EQUAL(1, 1);
}
int main(int argc, char **argv)
{
return UnitTest::RunAllTests();
}
Now I would expect test results after I press CTRL+F5. But when I do, I only get a popup window saying there are no tests:
I also noticed that when I go to Build > Build Project I get an error message:
fatal error: unittest++/UnitTest++.h: No such file or directory
I also found THIS ANSWER and tried different variation of console commands as per answer/comments there, but I always get the same no such file or directory error.
Any idea what I am missing?
EDIT:
Build log as per Stephen's Newell request:
/bin/sh -c '/usr/bin/make -j8 -e -f Makefile'
----------Building project:[ Test - Debug ]----------
make[1]: Entering directory '/home/callmebob/Documents/workspace-codelite/cpp/Test'
/usr/bin/g++ -c "/home/callmebob/Documents/workspace-codelite/cpp/Test/main.cpp" -g -o Debug/main.cpp.o -I. -I/usr/include/unittest++
/home/callmebob/Documents/workspace-codelite/cpp/Test/main.cpp:1:10: fatal error: unittest++/UnitTest++.h: No such file or directory
#include "unittest++/UnitTest++.h"
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Test.mk:95: recipe for target 'Debug/main.cpp.o' failed
make[1]: *** [Debug/main.cpp.o] Error 1
make[1]: Leaving directory '/home/callmebob/Documents/workspace-codelite/cpp/Test'
Makefile:4: recipe for target 'All' failed
make: *** [All] Error 2
====2 errors, 0 warnings====
Also if I right-click the project, go to Settings > Compiler, I can see:
Included Paths = /usr/include/unittest++
Based on your ls output, it looks like you should change your first line to this:
#include <UnitTest++/UnitTest++.h>
I'm not sure why the answer you linked to worked with a lowercase directory name; the examples in the project documentation all use the mixed-case directory name.

Install GCC: fatal error: gnu/stubs-32.h: No such file or directory

I'm using a server with Centos 6.6. I don't have root access and I want to install the gcc-4.8.1 to my own directory. I found a solution and I run the following commands:
wget http://www.netgull.com/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.gz
tar zxvf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1 --enable-languages=c,c++,fortran,go
make
I got errors when running the make command. It reports the following information:
configure: error: `CC' has changed since the previous run:
configure: former value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/include -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/sys-include '
configure: current value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/include -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/sys-include '
configure: error: in `/home/mypath/software/try_gcc2/objdir/x86_64-unknown-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make: *** [all] Error 2
I cannot figure what's wrong with my command. Thank you all for helping me!!!
I think I have found the solution. When I'm trying to build gcc-5.2.0, it reports that my server does not have 32-bit libraries. It also informs that if I still want to install anyway, I can add --disable-multilib when building. I tried and now the build is running normally.

Xerces no library found after install

I'm trying to run Xerces on Mac. I us
./configure CFLAGS="-arch x86_64" CXXFLAGS="-arch x86_64"
./configure --prefix=/opt
sudo make (this builds the library)
sudo make install (this installs the library)
I also include the libxerces-c.dylib on linker in NetBeans
Here is the error
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/xerces
mkdir -p build/Debug/GNU-MacOSX/_ext/619588065
rm -f "build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o.d"
g++ -c -g -I/opt/lib/libxerces-c.dylib -MMD -MP -MF "build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o.d" -o build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o ../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.cpp
In file included from ../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.cpp:26:
../../Documents/xerces-c-3.1.2/samples/src/SAXCount/SAXCount.hpp:26:10: fatal error: 'xercesc/util/PlatformUtils.hpp' file not found
#include <xercesc/util/PlatformUtils.hpp>
^
1 error generated.
make[2]: *** [build/Debug/GNU-MacOSX/_ext/619588065/SAXCount.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 128ms)
Any idea how to fix this??
Thanks!
Select Project in projects window.
Right-click for pop-up menu.
Select Properties in pop-up menu.
Select C++ Compiler under Build in Categories list on the left side of dialog.
Add a directory to Include Directories. The new directory should have PlatformUtils.hpp in the xercesc/util/ subdirectory of that directory. From your options I am guessing /opt/include/
Update
To Resolve
ld: library not found for -lxerces-c
Select Linker under Build in Categories list on the left side of dialog.
Add the directory containing libxerces-c.dylib and/or libxerces-c.a which appears to be /opt/lib/ to Additional Library Directories field.

run qwt example in Qt 5 on linux ubuntu

I cant figure out what I need to do for running example program which use Qwt library.
I download the file qwt-6.1.2.tar.bz2 from here as usual it goes to Download Direcory and I extract the file to this directory. I have now qwt-6.1.2 directory in Downloads directory.
The Qt directory in my machine located in /opt/Qt5.4.1/
How I continue from here?
I try to run qmake:
natile#natile-Precision-T1650:/opt/Qt5.4.1/5.4/gcc_64/bin$ sudo ./qmake /home/natile/Downloads/qwt-6.1.2/qwt.pro
And after I ran make:
natile#natile-Precision-T1650:/opt/Qt5.4.1/5.4/gcc_64/bin$ sudo make
but I get an error:
cd src/ && ( test -e Makefile || /opt/Qt5.4.1/5.4/gcc_64/bin/qmake /home/natile/Downloads/qwt-6.1.2/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/opt/Qt5.4.1/5.4/gcc_64/bin/src'
compiling /home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_abstract_scale_draw.cpp
In file included from /home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_abstract_scale_draw.cpp:19:0:
/home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_scale_map.h:92:5: error: ‘QT_STATIC_CONST’ does not name a type
/home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_scale_map.h:93:5: error: ‘QT_STATIC_CONST’ does not name a type
make[1]: *** [obj/qwt_abstract_scale_draw.o] Error 1
make[1]: Leaving directory `/opt/Qt5.4.1/5.4/gcc_64/bin/src'
make: *** [sub-src-make_first-ordered] Error 2
I understand that I have to run qmake.
I get nothing in the installation URL: http://qwt.sourceforge.net/qwtinstall.html
Please help.
The following approach works good for me:
cd /home/natile/Downloads/qwt-6.1.2/
mkdir build
/opt/Qt5.4.1/5.4/gcc_64/bin/qmake qwt.pro -o build/Makefile QWT_CONFIG="QwtExamples"
cd build
make
cd examples/bin
# Now you can launch any example, like:
./dials

Compiling Qt 4.8.5 using mingw32 on windows7: "no such file or directory"

I'm trying to build qt-4.8.5 (opensource) from source using mingw32 compiler on windows 7.
"configure" works fine, but compilation (mingw32-make) fails with this output:
D:\development\qt-4.8.5-mingw>mingw32-make
cd src/tools/bootstrap/ && D:/development/MinGW/bin/mingw32-make.EXE -f Makefile
mingw32-make.EXE[1]: Entering directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
D:/development/MinGW/bin/mingw32-make.EXE -f Makefile.Release
mingw32-make.EXE[2]: Entering directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NODLL -I'../../../include' -I'../../../include/QtCore' -I'../../../include/QtXml' -I'../../3rdparty/zlib' -I'd:/development/MSVS2008EXP/VC/INCLUDE' -I'd:/development/Microsoft SDKs/Windows/v6.1/include' -I'd:/development/MSVS2008EXP/VC/lib/' -I'd:/development/MS_SDKs/Windows/v6.1/Lib' -I'd:/DXSDK/Lib/x86' -I'../../../mkspecs/win32-g++-4.6' -o tmp/obj/release_shared/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp
g++: error: CreateProcess: No such file or directory
Makefile.Release:333: recipe for target 'tmp/obj/release_shared/qisciicodec.o' failed
mingw32-make.EXE[2]: *** [tmp/obj/release_shared/qisciicodec.o] Error 1
mingw32-make.EXE[2]: Leaving directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
Makefile:34: recipe for target 'release' failed
mingw32-make.EXE[1]: *** [release] Error 2
mingw32-make.EXE[1]: Leaving directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
Makefile:68: recipe for target 'sub-tools-bootstrap-make_default-ordered' failed
mingw32-make.EXE: *** [sub-tools-bootstrap-make_default-ordered] Error 2
I.e.:
g++: error: CreateProcess: No such file or directory
Because g++ DOESN'T print which file it can't find, I'm not certain what could be causing this.
I can call g++, gcc and mingw32-make from command line and they're in Path.
I've removed VC directories, MS SDK directories, and this doesn't fix the problem either.
This is a clean "install", I extracted tar.gz contents, and run configure without modifying anything. Adding mingw include path via -I switch to configure doesn't fix the problem.
How do I fix this?
Additional info:
g++ version: 4.7.1
mingw32-make version: 3.82.90
Figured it out. (Well, I still don't know what was causing this, but I know how to make it work).
Solution:
Place qt.conf into qt "bin" directory.
[Paths]
Prefix = d:/development/qt-4.8.5-mingw
Prefix is path of your qt installation (notice forward slashes).
Configure and compile using bat files:
To configure:
set QTDIR=D:\development\qt-4.8.5-mingw
set QMAKESPEC=win32-g++
set PATH=D:\development\MinGW\bin;D:\development\tools\Perl32\bin;D:\development\qt-4.8.5-mingw\bin
set PATH=%PATH%;c:\Windows\system32
set INCLUDE=
set LIB=
set CPATH=
set CPLUS_INCLUDE_PATH=
set LANG=en
configure -opensource -openssl
You should put into path bin directory of 32bit perl, bin directory of mingw32 installation, and bin directory of qt installation. -openssl key is optional (I need this one).
To compile:
set QTDIR=D:\development\qt-4.8.5-mingw
set QMAKESPEC=win32-g++
set PATH=D:\development\MinGW\bin;D:\development\tools\Perl32\bin;D:\development\qt-4.8.5-mingw\bin
set PATH=%PATH%;c:\Windows\system32
set INCLUDE=
set LIB=
set CPATH=
set CPLUS_INCLUDE_PATH=
set LANG=en
mingw32-make