Subject: [FEniCS-dev] cc1plus: warnings being treated as errors

From: L O <[email-masked]>
Date: Thu, 12 Feb 2009 13:45:44 -0800 (PST)

Hey all.

I'm installing DOLFIN for the first time and I get an error after the libdolfin completes successfully.  Any suggestions?

Thanks,
Nate

scons output:

mpicxx -o dolfin/swig/cpp_wrap.os -c -Wall -pipe -ansi -Werror -DDEBUG -g -DNDEBUG -O2 -DHAS_MPI=1 -DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=\"0.9.0\" -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_CHOLMOD=1 -fno-strict-aliasing -fPIC -I. -I/usr/local/include -I/usr/local/include/boost-1_35 -I/usr/include/libxml2 -I/usr/include/suitesparse -I/usr/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/suitesparse -I/usr/include/python2.5 -I/usr/include/python2.5 -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/include/boost-1_35 -I/usr/include/libxml2 -I/usr/include/suitesparse -I/usr/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/suitesparse dolfin/swig/cpp_wrap.cc
cc1plus: warnings being treated as errors
dolfin/swig/cpp_wrap.cc: In function ‘PyObject* _wrap_new_LUSolver(PyObject*, PyObject*)’:
dolfin/swig/cpp_wrap.cc:47839: error: ‘argv[0]’ may be used uninitialized in this function
.
.
.
scons: *** [dolfin/swig/cpp_wrap.os] Error 1
scons: building terminated because of errors.

---

From: Kent Andre <[email-masked]>
Date: Fri, 13 Feb 2009 09:50:55 +0100

You would need to go into dolfin/SConscript, search 
for Werror and change

        if not scons.checkVersion(swig_version, "1.3.36"):
            if "-Werror" in modEnv["CXXFLAGS"]:
                modEnv["CXXFLAGS"].remove("-Werror")

to             

        if "-Werror" in modEnv["CXXFLAGS"]:
            modEnv["CXXFLAGS"].remove("-Werror")

Kent

On to., 2009-02-12 at 13:45 -0800, L O wrote:
> Hey all.
> 
> I'm installing DOLFIN for the first time and I get an error after the
> libdolfin completes successfully.  Any suggestions?
> 
> Thanks,
> Nate
> 
> scons output:
> 
> 
> mpicxx -o dolfin/swig/cpp_wrap.os -c -Wall -pipe -ansi -Werror -DDEBUG
> -g -DNDEBUG -O2 -DHAS_MPI=1 -DMPICH_IGNORE_CXX_SEEK -DPACKAGE_VERSION=
> \"0.9.0\" -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_CHOLMOD=1
> -fno-strict-aliasing -fPIC -I. -I/usr/local/include
> -I/usr/local/include/boost-1_35 -I/usr/include/libxml2
> -I/usr/include/suitesparse -I/usr/include -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include -I/usr/include/suitesparse
> -I/usr/include/python2.5 -I/usr/include/python2.5
> -I/usr/lib/python2.5/site-packages/numpy/core/include
> -I/usr/local/include -I/usr/local/include/boost-1_35
> -I/usr/include/libxml2 -I/usr/include/suitesparse -I/usr/include
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/suitesparse dolfin/swig/cpp_wrap.cc
> dolfin/swig/cpp_wrap.cc: In function ‘PyObject*
> _wrap_new_LUSolver(PyObject*, PyObject*)’:
> _______________________________________________
> FEniCS-dev mailing list
> [email-masked]
> http://www.fenics.org/mailman/listinfo/fenics-dev

---

From: "Johannes Ring" <[email-masked]>
Date: Fri, 13 Feb 2009 09:54:18 +0100 (CET)

>             modEnv["CXXFLAGS"].remove("-Werror")

Yes, or simply

export CXXFLAGS="-Wall -pipe -ansi"
scons

Johannes

>> dolfin/swig/cpp_wrap.cc: In function ?PyObject*
>> _wrap_new_LUSolver(PyObject*, PyObject*)?:
>> dolfin/swig/cpp_wrap.cc:47839: error: ?argv[0]? may be used
>> uninitialized in this function
>> .
>> .
>> .

---

From: N <[email-masked]>
Date: Fri, 13 Feb 2009 05:47:12 -0800 (PST)

>             modEnv["CXXFLAGS"].remove("-Werror")

Thanks.  This worked perfectly.

Great package!

Nate