cpp demos fail after 'scons install'

Bug #513913 reported by Garth Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TriTetMesh
Fix Committed
Undecided
Unassigned

Bug Description

The cpp demos fail (link issues) after 'scons install'. Appears to be a linking issue.

When using the SConstruct files is

  https://code.launchpad.net/~garth-wells/tritetmesh/misc/+merge/18226

the demos run.

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 513913] [NEW] cpp demos fail after 'scons install'

On Thursday 28 January 2010 10:28:32 Garth Wells wrote:
> Public bug reported:
>
> The cpp demos fail (link issues) after 'scons install'. Appears to be a
> linking issue.

I assume you try to run the demos after you have compiled them from the root
of tritetmesh using enableDemos=1?

They run nicely for me.

> When using the SConstruct files is
>
> https://code.launchpad.net/~garth-wells/tritetmesh/misc/+merge/18226
>
> the demos run.

I have now added a similar to the dev branch

Johan

Revision history for this message
Garth Wells (garth-wells) wrote :

Johan Hake wrote:
> On Thursday 28 January 2010 10:28:32 Garth Wells wrote:
>> Public bug reported:
>>
>> The cpp demos fail (link issues) after 'scons install'. Appears to be a
>> linking issue.
>
> I assume you try to run the demos after you have compiled them from the root
> of tritetmesh using enableDemos=1?
>

I just did 'scons' (not 'scons install' as reported) from the root dir
of tritetmesh and the demos were built. I didn't use 'enableDemos=1' and
it's not in the options cache. When I run a demo I get

./demo: symbol lookup error:
/home/garth/code/fenics/dolfin/dolfin-all/local/lib/libdolfin.so.0:
undefined symbol: _Z26KSPMonitorTrueResidualNormP6_p_KSPidPv

If I do 'scons' in

  tritetmesh/demo/trimesh/areafunction/cpp

then the demo runs fine.

Garth

> They run nicely for me.
>
>> When using the SConstruct files is
>>
>> https://code.launchpad.net/~garth-wells/tritetmesh/misc/+merge/18226
>>
>> the demos run.
>
> I have now added a similar to the dev branch
>
> Johan
>

Revision history for this message
Garth Wells (garth-wells) wrote :

Looks like a problem with the version of PETSc. Doing

   scons

links to the system-wide installation of PETsc which is in /usr.

Doing 'scons' on a demo picks up my version of PETSc which is pointed to by PETSC_DIR.

Revision history for this message
Johan Hake (johan-hake) wrote :

On Thursday 28 January 2010 11:42:19 Garth Wells wrote:
> Johan Hake wrote:
> > On Thursday 28 January 2010 10:28:32 Garth Wells wrote:
> >> Public bug reported:
> >>
> >> The cpp demos fail (link issues) after 'scons install'. Appears to be a
> >> linking issue.
> >
> > I assume you try to run the demos after you have compiled them from the
> > root of tritetmesh using enableDemos=1?
>
> I just did 'scons' (not 'scons install' as reported) from the root dir
> of tritetmesh and the demos were built. I didn't use 'enableDemos=1' and
> it's not in the options cache. When I run a demo I get

I then wonder why the demo even was compiled?

Johan

> ./demo: symbol lookup error:
> /home/garth/code/fenics/dolfin/dolfin-all/local/lib/libdolfin.so.0:
> undefined symbol: _Z26KSPMonitorTrueResidualNormP6_p_KSPidPv
>
> If I do 'scons' in
>
> tritetmesh/demo/trimesh/areafunction/cpp
>
> then the demo runs fine.
>
> Garth
>
> > They run nicely for me.
> >
> >> When using the SConstruct files is
> >>
> >> https://code.launchpad.net/~garth-wells/tritetmesh/misc/+merge/18226
> >>
> >> the demos run.
> >
> > I have now added a similar to the dev branch
> >
> > Johan
>

Revision history for this message
Garth Wells (garth-wells) wrote :

The problem could be that

  -Wl,-rpath

is missing when the tritetmesh library is built. The are presented when one does

  pkg-config --libs tritetmesh_tetmesh

I recall a problem like this with DOLFIN. I can't remember the details, but it was to do with pkg-config stripping away flags like -Wl,-rpath and just returning the path to the libraries.

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 513913] Re: cpp demos fail after 'scons install'

On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
> Looks like a problem with the version of PETSc. Doing
>
> scons
>
> links to the system-wide installation of PETsc which is in /usr.

I just changed a modenv.Append(linkflags...) -> modenv.Prepend(linkflags...),
when building the demos from root. This might help?

I see that the SConscript in dolfin/demo also do Append. Do you have troubles
running these?

Johan

> Doing 'scons' on a demo picks up my version of PETSc which is pointed
> to by PETSC_DIR.
>

Revision history for this message
Garth Wells (garth-wells) wrote :

Johan Hake wrote:
> On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
>> Looks like a problem with the version of PETSc. Doing
>>
>> scons
>>
>> links to the system-wide installation of PETsc which is in /usr.
>
> I just changed a modenv.Append(linkflags...) -> modenv.Prepend(linkflags...),
> when building the demos from root. This might help?
>

Doesn't help.

Does the version of simula_scons distributed with tritetgen use the
pkg-config flags '--libs-only-l' and '--libs-only-L'? These strip away
-rpath, etc, which is bad.

> I see that the SConscript in dolfin/demo also do Append. Do you have troubles
> running these?
>

No.

Garth

> Johan
>
>> Doing 'scons' on a demo picks up my version of PETSc which is pointed
>> to by PETSC_DIR.
>>
>

Revision history for this message
Johan Hake (johan-hake) wrote :

On Thursday 28 January 2010 12:13:24 Garth Wells wrote:
> The problem could be that
>
> -Wl,-rpath
>
> is missing when the tritetmesh library is built. The are presented when
> one does
>
> pkg-config --libs tritetmesh_tetmesh
>
> I recall a problem like this with DOLFIN. I can't remember the details,
> but it was to do with pkg-config stripping away flags like -Wl,-rpath
> and just returning the path to the libraries.

You might be correct here. After some digging I think I have fixed it.

Johan

Revision history for this message
Johan Hake (johan-hake) wrote :

On Thursday 28 January 2010 12:32:02 Garth Wells wrote:
> Johan Hake wrote:
> > On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
> >> Looks like a problem with the version of PETSc. Doing
> >>
> >> scons
> >>
> >> links to the system-wide installation of PETsc which is in /usr.
> >
> > I just changed a modenv.Append(linkflags...) ->
> > modenv.Prepend(linkflags...), when building the demos from root. This
> > might help?
>
> Doesn't help.
>
> Does the version of simula_scons distributed with tritetgen use the
> pkg-config flags '--libs-only-l' and '--libs-only-L'? These strip away
> -rpath, etc, which is bad.

The simula-scons version in tritetmesh is more or less the same as in dolfin,
however, the fix was done in the SConscript file. The flags were collected
from the pkg-config file but not added to the build environment.

They are now.

Johan

> > I see that the SConscript in dolfin/demo also do Append. Do you have
> > troubles running these?
>
> No.
>
> Garth
>
> > Johan
> >
> >> Doing 'scons' on a demo picks up my version of PETSc which is pointed
> >> to by PETSC_DIR.
>

Revision history for this message
Garth Wells (garth-wells) wrote :

Johan Hake wrote:
> On Thursday 28 January 2010 12:32:02 Garth Wells wrote:
>> Johan Hake wrote:
>>> On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
>>>> Looks like a problem with the version of PETSc. Doing
>>>>
>>>> scons
>>>>
>>>> links to the system-wide installation of PETsc which is in /usr.
>>> I just changed a modenv.Append(linkflags...) ->
>>> modenv.Prepend(linkflags...), when building the demos from root. This
>>> might help?
>> Doesn't help.
>>
>> Does the version of simula_scons distributed with tritetgen use the
>> pkg-config flags '--libs-only-l' and '--libs-only-L'? These strip away
>> -rpath, etc, which is bad.
>
> The simula-scons version in tritetmesh is more or less the same as in dolfin,
> however, the fix was done in the SConscript file. The flags were collected
> from the pkg-config file but not added to the build environment.
>
> They are now.
>

Thanks! I spotted it but you beat me to it.

I have another error now. When I do 'scons' I get

scons: *** [/usr/local/include/tritetmesh]
/usr/local/include/tritetmesh: Permission denied
scons: building terminated because of errors.

Garth

> Johan
>
>>> I see that the SConscript in dolfin/demo also do Append. Do you have
>>> troubles running these?
>> No.
>>
>> Garth
>>
>>> Johan
>>>
>>>> Doing 'scons' on a demo picks up my version of PETSc which is pointed
>>>> to by PETSC_DIR.
>

Changed in tritetmesh:
status: New → Fix Committed
Revision history for this message
Johan Hake (johan-hake) wrote :

On Thursday 28 January 2010 13:08:21 Garth Wells wrote:
> Johan Hake wrote:
> > On Thursday 28 January 2010 12:32:02 Garth Wells wrote:
> >> Johan Hake wrote:
> >>> On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
> >>>> Looks like a problem with the version of PETSc. Doing
> >>>>
> >>>> scons
> >>>>
> >>>> links to the system-wide installation of PETsc which is in /usr.
> >>>
> >>> I just changed a modenv.Append(linkflags...) ->
> >>> modenv.Prepend(linkflags...), when building the demos from root. This
> >>> might help?
> >>
> >> Doesn't help.
> >>
> >> Does the version of simula_scons distributed with tritetgen use the
> >> pkg-config flags '--libs-only-l' and '--libs-only-L'? These strip away
> >> -rpath, etc, which is bad.
> >
> > The simula-scons version in tritetmesh is more or less the same as in
> > dolfin, however, the fix was done in the SConscript file. The flags were
> > collected from the pkg-config file but not added to the build
> > environment.
> >
> > They are now.
>
> Thanks! I spotted it but you beat me to it.
>
> I have another error now. When I do 'scons' I get
>
> scons: *** [/usr/local/include/tritetmesh]
> /usr/local/include/tritetmesh: Permission denied
> scons: building terminated because of errors.

I have tried to reproduce this but I can't. Can you include more informations?

Johan

> Garth
>
> > Johan
> >
> >>> I see that the SConscript in dolfin/demo also do Append. Do you have
> >>> troubles running these?
> >>
> >> No.
> >>
> >> Garth
> >>
> >>> Johan
> >>>
> >>>> Doing 'scons' on a demo picks up my version of PETSc which is pointed
> >>>> to by PETSC_DIR.
>

Revision history for this message
Garth Wells (garth-wells) wrote :

Johan Hake wrote:
> On Thursday 28 January 2010 13:08:21 Garth Wells wrote:
>> Johan Hake wrote:
>>> On Thursday 28 January 2010 12:32:02 Garth Wells wrote:
>>>> Johan Hake wrote:
>>>>> On Thursday 28 January 2010 11:56:23 Garth Wells wrote:
>>>>>> Looks like a problem with the version of PETSc. Doing
>>>>>>
>>>>>> scons
>>>>>>
>>>>>> links to the system-wide installation of PETsc which is in /usr.
>>>>> I just changed a modenv.Append(linkflags...) ->
>>>>> modenv.Prepend(linkflags...), when building the demos from root. This
>>>>> might help?
>>>> Doesn't help.
>>>>
>>>> Does the version of simula_scons distributed with tritetgen use the
>>>> pkg-config flags '--libs-only-l' and '--libs-only-L'? These strip away
>>>> -rpath, etc, which is bad.
>>> The simula-scons version in tritetmesh is more or less the same as in
>>> dolfin, however, the fix was done in the SConscript file. The flags were
>>> collected from the pkg-config file but not added to the build
>>> environment.
>>>
>>> They are now.
>> Thanks! I spotted it but you beat me to it.
>>
>> I have another error now. When I do 'scons' I get
>>
>> scons: *** [/usr/local/include/tritetmesh]
>> /usr/local/include/tritetmesh: Permission denied
>> scons: building terminated because of errors.
>
> I have tried to reproduce this but I can't. Can you include more
> informations?
>

I opened a new bug report,

   https://bugs.launchpad.net/bugs/513913

Garth

> Johan
>
>> Garth
>>
>>> Johan
>>>
>>>>> I see that the SConscript in dolfin/demo also do Append. Do you have
>>>>> troubles running these?
>>>> No.
>>>>
>>>> Garth
>>>>
>>>>> Johan
>>>>>
>>>>>> Doing 'scons' on a demo picks up my version of PETSc which is pointed
>>>>>> to by PETSC_DIR.
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.