I am trying to compile a public software called CofiRank. Here is the link to package: https://github.com/markusweimer/cofirank
To compile it I run:
make -f CofiRank-Makefile.mk CONF=Deploy
and here is part of my terminal results:
g++ -D NDEBUG -c -g -Isrc -Ilibs -o build/Deploy/GNU-
MacOSX/src/loss/ndcgdomainmodel.o src/loss/ndcgdomainmodel.cpp
In file included from src/utils/ublastools.cpp:1:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
In file included from src/bmrm/solver/dualinnersolver.cpp:29:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/utils/ublastools.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/bmrm/solver/dualinnersolver.o]
In file included from src/bmrm/solver/daifletcherpgm.cpp:28:
In file included from src/bmrm/solver/daifletcherpgm.hpp:22:
In file included from src/bmrm/solver/dualinnersolver.hpp:6:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/loss/ndcgdomainmodel.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
I searched a lot but could not fix it. I think I need to use libstd++ instead lib++ which is the default of mac os, but I don't know how to (or if it is the problem)
can someone help me on this?
<ext/numeric> is a non-standard header file provided by the GNU C++ standard library (libstdc++) that comes with GCC.
You are probably compiling with Clang, and so need to tell it to use the GNU library not its own one, so compile with -stdlib=libstdc++
Related
I like to compile and use gdb 9.1. the source is here https://ftp.gnu.org/gnu/gdb/
Plus when I type make in config directory make says make: *** No targets specified and no makefile found. Stop. because there is not make file. on root folder there are Makefile.in and Makefile.tpl and Makefile.def. what are these files. and how can I install gdb 9 from source code.
Update
After the comment changes I made in command by G.M I am getting this error I think almost at the end of compiling process
mv GDBvn.new GDBvn.texi
/home/fawad/Desktop/gdb/gdb/gdb-9.1.1/missing makeinfo --split-size=5000000 --split-size=5000000 -I /home/fawad/Desktop/gdb/gdb
/gdb-9.1.1/gdb/doc/../../readline/readline/doc -I /home/fawad/Desktop
/gdb/gdb/gdb-9.1.1/gdb/doc/../mi -I /home/fawad/Desktop/gdb/gdb/gdb-9.1.1/gdb/doc
-o gdb.info /home/fawad/Desktop/gdb/gdb/gdb-9.1.1/gdb/doc/gdb.texinfo
/home/fawad/Desktop/gdb/gdb/gdb-9.1.1/missing: 81: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
http://www.gnu.org/software/texinfo/
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
http://www.gnu.org/software/make/
make[4]: *** [Makefile:490: gdb.info] Error 127
make[4]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb/doc'
make[3]: *** [Makefile:2010: subdir_do] Error 1
make[3]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb'
make[2]: *** [Makefile:1655: all] Error 2
make[2]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb'
make[1]: *** [Makefile:9564: all-gdb] Error 2
make[1]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build'
make: *** [Makefile:852: all] Error 2
I'm an inexperienced programmer so bear with me if this little sense. I'm trying to run a basic "hello world" kind of program in CLion, except I'm trying to print out a value in the main.cpp file from a header and cpp file. I'm using MacOS and everything is update in terms of software. When I try to build or run the program, it gives me these errors:
====================[ Build | untitled1 | Debug ]===============================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/anshuldaga/untitled1/cmake-build-debug --target untitled1 -- -j 2
[ 33%] Building CXX object CMakeFiles/untitled1.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/untitled1.dir/test.cpp.o
make[3]: /Library/Developer/CommandLineTools/usr/bin/c++: Permission denied
make[3]: /Library/Developer/CommandLineTools/usr/bin/c++: Permission denied
make[3]: *** [CMakeFiles/untitled1.dir/main.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/untitled1.dir/test.cpp.o] Error 1
make[2]: *** [CMakeFiles/untitled1.dir/all] Error 2
make[1]: *** [CMakeFiles/untitled1.dir/rule] Error 2
make: *** [untitled1] Error 2
I've already tried running the sudo g++ main.cpp command and it gives me this error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Based off my research, I know that clang is the compiler for c++ and a linker error is basically when something can't find the right files or library.
I've uninstalled and reinstalled Xcode, did the
sudo xcode-select -switch /Library/Developer/CommandLineTools/
command. I'm not sure what to do at this point. Any help would be greatly appreciated, thank you!
According to this(archive.org) old post from the CLion forum, the xcode license agreement might be the issue. Try to start xcode and agree to the license, or run sudo xcodebuild -license.
I'm attempting to compile GMP 5.1.3 with MinGW on a 64 bit Windows 7 machine as a prerequisite to setting up pycrypto. To configure GMP I used ./configure --prefix=C:/Python27/Lib/site-packages/gmp-5.1.3. When I enter the make command, I get the error:
../libtool: line 1109: lib: command not found
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving director '/c/Python27/Lib/site-packages/gmp-5.1.3/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/c/Python27/Lib/site-packages/gmp-5.1.3'
make: *** [all] Error 2
I've been fishing around Google and reviewing the instructions for GMP to no avail. Found lots of maybe similar problems, but nothing that directly relates. Though I have the sneaking suspicion that the problem is right in front of me and I've just been staring at the screen too long.
I am trying to compile GCC for Cygwin with support for targeting i386-elf so I can compile some simple OSes (search Benu, by l30nard0, on Github). I've successfully compiled the binutils for i386-elf, and compiled all of GCC's floating-point numbers dependencies.
Problem is, it says windows.h can not be found. I do have w32api successfully installed, and tried including each of those one at a time in the include path for GCC, but none of them work. If I try any of them, I get so many errors and warnings that not all will show up in the Cygwin console. The dozens upon dozens of warnings are most if not all unused parameter.
Does anyone know where the problem might lie?
I've wasted the last three entire days of my life trying to get Linux Mint set up with everything I want, but for reasons I shan't go into I gave up on that. I'd love to be able to get just one thing to work so I can enjoy my life again. :) Thanks!
BTW: The configure arguments I used were --target=i386-elf --enable-threads=win32 --enable-languages=c,c++ Was I supposed to use --enable-targets instead?
And here's part of the log:
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2.o' failed
make[2]: *** [unwind-dw2.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../gcc/libgcc/gthr.h:150:0,
from ../../../gcc/libgcc/unwind-dw2-fde.c:38:
./gthr-default.h:541:21: fatal error: windows.h: No such file or directory
compilation terminated.
../../../gcc/libgcc/static-object.mk:17: recipe for target 'unwind-dw2-fde.o' failed
make[2]: *** [unwind-dw2-fde.o] Error 1
make[2]: Leaving directory '/home/Sean/gccbuild/i386-elf/libgcc'
Makefile:10055: recipe for target 'all-target-libgcc' failed
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory '/home/Sean/gccbuild'
Makefile:870: recipe for target 'all' failed
make: *** [all] Error 2
Remove the --enable-threads=win32 flag; it is intended to specify thread support on the target system, not the build system.
I've been trying to install Mosh (the mobile shell) on the following system:
[ptedder#ukch-dev-lndt03 mosh-1.2.4]$ cat /etc/*-release
CentOS release 5.3 (Final)
It configures okay, however when I try and make Mosh 1.2.4 (or 1.2.0) I get the following error:
make all-recursive
make[1]: Entering directory `/home/ptedder/bin/mosh-1.2.4'
Making all in src
make[2]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src'
Making all in protobufs
make[3]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make all-am
make[4]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
CXX userinput.pb.o
In file included from userinput.pb.cc:5:
userinput.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
userinput.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
userinput.pb.h:14:2: error: #error your headers.
make[4]: *** [userinput.pb.o] Error 1
make[4]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ptedder/bin/mosh-1.2.4'
make: *** [all] Error 2
This was with Protocol buffers version 2.4.1 (suggested it might be hardcoded into mosh here #import <string> in ios? Protobuf c++ in ios) but I've tried using Protocol buffers version 2.3.0 and 2.5.0 as well and they all give the following error:
"This file was generated by a newer version of protoc which is
userinput.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
userinput.pb.h:14:2: error: #error your headers."
any ideas?
Two years after this question was asked, I still couldn't find a good solution. I had the same problem, and eventually fixed it after some detective work. The problem was this: I had the latest version of protobuf from the git repo, https://github.com/google/protobuf. When I tried to build my project, it was throwing the error shown in qmp's answer,
#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is...
I was building code that someone else wrote, and in their .proto file, they didn't specify a version. The default is syntax = "proto2"; I added syntax = "proto3"; to the .proto file just before the package declaration and removed all instances of the optional and required keywords, as they are not part of version 3 syntax. Then from the command line, I regenerated the protobuf output.
prompt#ubuntu$ protoc --cpp_out=. project.proto
This updated all the files generated by protoc to version 3, which solved the issue.
If you look at userinput.pb.h, you will notice it reads
#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is
So protobuf-2.4.1 is sufficient for mosh-1.2.4. If you still get the error, then there may be a stray protobuf installation, likely something in /usr/local.