stefanocasazza / ULib

C++ application development framework, to help developers create and deploy applications quickly and simply
GNU Lesser General Public License v3.0
947 stars 107 forks source link

Compilaion problems #29

Closed shivshankardayal closed 7 years ago

shivshankardayal commented 7 years ago

On a new Linux installation I downloaded ULib 1.4.2 release. Build and install went clean. However, I am still having problems with usp file compilation.

shiv@laptop:~/Downloads/ULib-1.4.2/src/ulib/net/server/plugin/usp$ usp_compile.sh hello
g++: error: unrecognized command line option ‘-Wduplicated-cond’
g++: error: unrecognized command line option ‘-Wtautological-compare’
g++: error: unrecognized command line option ‘-Wshift-negative-value’
g++: error: unrecognized command line option ‘-Wshift-overflow’
g++: error: unrecognized command line option ‘-Wshift-overflow=2’
g++: error: unrecognized command line option ‘-Wnull-dereference’
g++: error: unrecognized command line option ‘-Wterminate’
g++: error: unrecognized command line option ‘-Wlto-type-mismatch’
g++: error: unrecognized command line option ‘-Wsubobject-linkage’
g++: error: unrecognized command line option ‘-Wplacement-new’
g++: error: unrecognized command line option ‘-Wvirtual-inheritance’
g++: error: unrecognized command line option ‘-Wnamespaces’
mv: cannot stat '.libs/hello.usp': No such file or directory
mv: cannot stat '.libs/hello.so': No such file or directory
shiv@laptop:~/Downloads/ULib-1.4.2/src/ulib/net/server/plugin/usp$

usp_compile.sh is located in /usr/local/bin. userver_tcp works fine but I am unable to compile any usp file.

stefanocasazza commented 7 years ago

Hi,

my understanding is that you have a old version of usp_compile.sh somewhere builded with a different version of g++, please check... The command line option inside usp_compile.sh are builded together with ULib configuration so it is not possible build of ULib go clean and usp_compile.sh instead not...

Bests Stefano

victorstewart commented 7 years ago

As Stefano was saying, when you built ULib, it checked your C++ compiler and it's version, and then generate certain USP compile time flags accordingly.

Those flags it's not finding are all warning type flags of one type or another, see how they start with "-W".

So there is a mismatch between the version of g++ you just tried compiling the USP wirh, and the version ULib found at compile time.

Check the output of your ./configure, that will say where it was found and what version. Also check your alias of g++ and see where that points.

You can also see the environment variable CXX before running ./configure, to point ULib at a specific version of g++