On Mon, Apr 18, 2016 at 2:14 PM, John Peterson <jwpeter...@gmail.com> wrote:

>
>
> On Fri, Apr 15, 2016 at 7:32 PM, John Peterson <jwpeter...@gmail.com>
> wrote:
>
>>
>>
>> On Thu, Apr 14, 2016 at 9:32 PM, Jeff opt <jeff.y...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I am installing libmesh. Everything was ok until the following happened
>>> when installing:
>>>
>>> libmesh-master/libtool: line 10545: mpicxx: command not found
>>> libtool:   error: error: relink 'libmesh_dbg.la' with the above command
>>> before installing it
>>> make[2]: *** [install-libLTLIBRARIES] Error 1
>>>
>>> I guess the problem lies in my system rather than libmesh but help me.
>>>
>>
>> This is pretty strange... it sounds like you had an mpicxx in your PATH
>> while you were initially compiling, but it was somehow missing at link
>> time.  I don't know how this could happen, other than if your environment
>> somehow changed while you were compiling?
>>
>
> Just an update on this for the mailing list archive:
>
> We tracked the issue down to mpicxx not being in root's path when "sudo
> make install" was run, hence the cryptic "not found" error message above.
> We confirmed that installing libmesh to a non-system location (i.e. not
> requiring sudo) worked just fine on this system.
>
> This was a bit confusing to me, since on my system "sudo env" shows that
> the new shell inherits my current PATH, but perhaps some systems' sudo can
> be configured differently than others...
>

"My system" being a Mac.  The default on Ubuntu is to use the "secure_path"
option in /etc/sudoers, so that the user's current PATH does not make it
into the sudo shell:

Defaults
 secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

When this option is used, not even "sudo -E" allows the user's PATH to be
inherited by the sudo shell.  It also means that changing the root user's
PATH by modifying his .bashrc is out.  About the only workaround I've seen
is to set the PATH inline, i.e.:

sudo PATH=$PATH env

I'd like to blame the autotools for this.  "make install" should not need
to run mpicxx for any reason; it should just copy stuff to the installation
directory.  But this may not be possible with the intricacies of shared
libraries, etc. being what they are.

-- 
John
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to