installation problems in mac machine

Dominik Szczerba dominik at itis.ethz.ch
Mon Dec 21 15:33:35 CST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Knepley wrote:
> On Mon, Dec 21, 2009 at 3:20 PM, Dominik Szczerba <dominik at itis.ethz.ch
> <mailto:dominik at itis.ethz.ch>> wrote:
> 
> With sudo you gain administrative rights (still depends on the actual
> sudoers config) - in principle you can harm your system by mistake (sudo
>  rm -fr /usr/lib/* ...). That is why it is normally not allowed on large
> multiuser systems. It should be possible to use any non-system software
> without it.
> 
> 
>> Installation is almost always done with root permission. If you want to
>> be pendatic,
>> you can create other users for specific tasks, like the webserver, but
>> you STILL
>> sudo to that user.

- From Wikipedia:

"The sudo (...) command is a program for some Unix and Unix-like
computer operating systems that allows users to run programs with the
security privileges of another user (normally the superuser, a.k.a. root)."

If "another user" is the superuser (which it often is in popular linux
distros) if you are lucky you can render your system non-bootable (if
you are not you can lose data).

I strongly discourage anybody using superuser for compilation - or God
forbid - entrusting oneself to installation scripts of 3rd party
programs on critical systems [*].

Dominik

[*] General attitude, not just Petsc.

> 
>>    Matt
> 
> 
> Dominik
> 
> 
> Matthew Knepley wrote:
>> On Mon, Dec 21, 2009 at 3:13 PM, Dominik Szczerba
> <dominik at itis.ethz.ch <mailto:dominik at itis.ethz.ch>
>> <mailto:dominik at itis.ethz.ch <mailto:dominik at itis.ethz.ch>>> wrote:
> 
>> Why use sudo in the first place?
>> I am not a mac user, but normally on unix sudo is the last thing you
>> want to use during everyday work (provided that you are at all allowed
>> to use it).
> 
> 
>>> Not sure why you would think that. In fact, sudo is the safe way
> to do
>>> things
>>> and recommended for everyday usage.
> 
>>>   Matt
> 
> 
>> Dominik
> 
>> Satish Balay wrote:
>>> Perhaps 'sudo' is not proegating PETSC_DIR,PETSC_ARCH variables
>>> properly?
> 
>>> Try 'sudo /bin/bash' and do the whole install in that shell.
> 
>>> BTW: you have a typo with PETSC_ARCH further down..  And we recommend
>>> using COPTFLAGS, FOPTFLAGS --with-debugging=0 for optimziation
> builds.
> 
>>> Satish
> 
>>> On Mon, 21 Dec 2009, hxie at umn.edu <mailto:hxie at umn.edu>
> <mailto:hxie at umn.edu <mailto:hxie at umn.edu>> wrote:
> 
>>>> Hi,
>>>>
>>>> My operation system is Mac OS X 10.6.2. I unzip the petsc under
>>>> /usr/local/petsc-3.0.0-p10.
>>>> I use the following to configure petsc.
>>>> -------
>>>> sudo ./config/configure.py --CFLAGS=-O3 --FFLAGS=-O3
>>>> --with-mpi-dir=/usr/local/mpich2-1.2.1 --with-fortran
> --with-shared=0
>>>> --with-fc=gfortran
>>>> -------
>>>>
>>>> And I run the following commands:
>>>> ----
>>>> export PETS_ARCH=darwin10.2.0-c-debug;
>>>> PETSC_DIR=/usr/local/petsc-3.0.0-p10; export PETSC_DIR
>>>> ----
>>>>
>>>> When I run " sudo make all", it gives some errors:
>>>> -----
>>>> makefile:15: /conf/base: No such file or directory
>>>> makefile:16: /conf/test: No such file or directory
>>>> make: *** No rule to make target `/conf/test'.  Stop.
>>>> -----
>>>>
>>>> It seems it cannot find the PETSC_DIR. (I use x11. "echo $SHELL"
> gets
>>>> "/bin/bash")
>>>> Do I need to add "PETSC_DIR = /usr/local/petsc-3.0.0-p10" in the
>> makefile
>>>> file? Thanks.
>>>>
>>>> Bests,
>>>> Hui
>>>>
>>>>
>>>>
>>>>
> 
> 
> 
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which
>> their experiments lead.
>> -- Norbert Wiener
> 

> -- 
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which
> their experiments lead.
> -- Norbert Wiener

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAksv6akACgkQ/EBMh9bUuzI6OgCfbVX3klLEC1hxmvP3Oi+ONrC+
N+EAoK+JjmWiGo6MzszvRmoEK7p/vJao
=UNSb
-----END PGP SIGNATURE-----


More information about the petsc-users mailing list