LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   -fpermissive error while trying to compile a package with make (https://www.linuxquestions.org/questions/linux-software-2/fpermissive-error-while-trying-to-compile-a-package-with-make-4175532921/)

nouse 02-03-2015 05:57 AM

-fpermissive error while trying to compile a package with make
 
Hi!

I let this speak for itself:


Code:

make
make  all-recursive
make[1]: Entering directory `/opt/hpc-clust-1.1.1'
Making all in eutils
make[2]: Entering directory `/opt/hpc-clust-1.1.1/eutils'
make  all-am
make[3]: Entering directory `/opt/hpc-clust-1.1.1/eutils'
g++ -DHAVE_CONFIG_H -I.    -O3 -pthread -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread -MT logger.o -MD -MP -MF .deps/logger.Tpo -c -o logger.o logger.cpp
In file included from evar.h:8:0,
                from logger.cpp:5:
ebasicarray_dec.h: In instantiation of ‘T& ebasicarray<T>::add(const T&) [with T = estr*]’:
earrayof.h:147:3:  required from ‘T& earrayof<T, K>::add(const K&, const T&) [with T = int; K = estr]’
earrayof.h:260:21:  required from ‘T& earrayof<T, K>::operator[](const K&) [with T = int; K = estr]’
logger.cpp:130:85:  required from here
ebasicarray_dec.h:46:51: error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
    inline T& add(const T& value) { push_back(value); return(vector<T>::back()); }
                                                  ^
ebasicarray_dec.h:46:51: note: declarations in dependent base ‘std::vector<estr*, std::allocator<estr*> >’ are not found by unqualified lookup
ebasicarray_dec.h:46:51: note: use ‘this->push_back’ instead
ebasicarray_dec.h: In instantiation of ‘T& ebasicarray<T>::add(const T&) [with T = int*]’:
earrayof.h:148:3:  required from ‘T& earrayof<T, K>::add(const K&, const T&) [with T = int; K = estr]’
earrayof.h:260:21:  required from ‘T& earrayof<T, K>::operator[](const K&) [with T = int; K = estr]’
logger.cpp:130:85:  required from here
ebasicarray_dec.h:46:51: error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ebasicarray_dec.h:46:51: note: declarations in dependent base ‘std::vector<int*, std::allocator<int*> >’ are not found by unqualified lookup
ebasicarray_dec.h:46:51: note: use ‘this->push_back’ instead
ebasicarray_dec.h: In instantiation of ‘T& ebasicarray<T>::add(const T&) [with T = CDebugLine]’:
ebasicarray.h:97:12:  required from ‘size_t ebasicarray<T>::unserial(const estr&, size_t) [with T = CDebugLine; size_t = long unsigned int]’
logger.cpp:170:1:  required from here
ebasicarray_dec.h:46:51: error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ebasicarray_dec.h:46:51: note: declarations in dependent base ‘std::vector<CDebugLine, std::allocator<CDebugLine> >’ are not found by unqualified lookup
ebasicarray_dec.h:46:51: note: use ‘this->push_back’ instead
ebasicarray_dec.h: In instantiation of ‘T& ebasicarray<T>::add(const T&) [with T = evar*]’:
ebasicarray.h:97:12:  required from ‘size_t ebasicarray<T>::unserial(const estr&, size_t) [with T = evar*; size_t = long unsigned int]’
logger.cpp:170:1:  required from here
ebasicarray_dec.h:46:51: error: ‘push_back’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ebasicarray_dec.h:46:51: note: declarations in dependent base ‘std::vector<evar*, std::allocator<evar*> >’ are not found by unqualified lookup
ebasicarray_dec.h:46:51: note: use ‘this->push_back’ instead
make[3]: *** [logger.o] Error 1
make[3]: Leaving directory `/opt/hpc-clust-1.1.1/eutils'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/hpc-clust-1.1.1/eutils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/hpc-clust-1.1.1'
make: *** [all] Error 2

I have no idea what is wrong here, but i hope someone else has. Thank you!

knudfl 02-03-2015 07:09 AM

Quote:

I have no idea what is wrong here
Wrong compiler.

``hpc-clust-1.1.1´´ will compile OK with g++ version 4.4.x.

Debian / Ubuntu / Mint example :
$ cd hpc-clust-1.1.1/
$ export CC=gcc-4.4 CXX=g++-4.4 && ./configure
$ make clean && make

Any questions ? Then please specify your OS :
a) $ uname -m
b) OS name and version.


-

nouse 02-03-2015 07:27 AM

Thank you very much for this quick answer.

We have Ubuntu 14.04
uname -m yields x86_64


I assume our compiler is not up to date?

export CC=gcc-4.4 CXX=g++-4.4 && ./configure

checking whether the C++ compiler works... no
configure: error: in `/media/4tb/trichter/hpc-clust-1.1.1':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.

knudfl 02-03-2015 08:14 AM

Quote:

C++ compiler cannot create executables
No g++-4.4 ?
You cannot use a tool that isn't present on your OS.

Install g++-4.4 : $ sudo apt-get install g++-4.4

nouse 02-03-2015 08:55 AM

Thank you very much!
g++ got installed.
Quite frankly, i wasnt aware that the package would need it. The manual doesnt tell.^^

knudfl 02-03-2015 01:23 PM

← #5 .

Though all the files in hpc-clust-1.1.1 have a time stamp : 2014,
some of the code may be a bit older, not usable with g++-4.7 or later.
( `g++-4.6´ may be usable, that I haven't tested.)

Not easy to specify a compiler in a manual,
may vary from one OS to another.

And: Could be the author used 'Scientific Linux SL6' for the code.
→ The SL6 default compiler is gcc/g++ version 4.4.7 .

-


All times are GMT -5. The time now is 04:26 AM.