[Pythonmac-SIG] Solution to some SWIG Install problems on Mac OS X
Chris.Barker at noaa.gov
Tue Dec 13 18:25:46 CET 2005
I'm glad you got this working. Thanks for posting the resolution to your
problems, it's good to have this stuff archived. If time permits, I hope top
do some SWIGing myself, so perhaps we can help each other out.
On Thursday 08 December 2005 1:17 pm, Louis Pecora wrote:
> Solution: directories (folders) and files with spaces and special
> Mac symbols (e.g. option-whatever) can cause problems.
Yup. Technically, a file name on *nix can have any charactor in it except a
"/", so many utilities use space to separate things that it's hard for things
to work right with them in there. I spend most of my time on Linux, so I'm
not in the habit of using spaces in file names anyway.
> setenv CC g++
> in my login file .tschrc which I got from a colleague.
The dangers of borrowing other people's code! Why are you using tsch anyway?
bash really is nicer, unless you're really used to a C shell. And it's the
OS-X default (and most Linuxes also).
Setting CC to g++ is a very odd thing to do. It's going to break a lot of make
files, CC should be a C compiler!
> I changed it to
> setenv CC gcc
You should probably just not set it to anything. gcc should be the default
anyway. On my system, /usr/bin/CC is a link to gcc-3.3
> (3) running 'make install' would not work since I had no permission to
> write in some directories. I don't fully understand this since I am the
> admin and I was running logged in as such, but to no avail.
> Solution: run this as
> sudo make install
This is VERY standard stuff. I think I recall you're having a hard time
transitioning to the multi-user environment of OS-X a few years back, and
having some discussion about it on the MacPython list...or maybe that was
OS-X has the best system for dealing with this I've seen. By default, it is
set up so that it is impossible to be logged in as the root user (unix talk
for system administrator). This is a good thing, as the root user can do
anything, and it's remarkable easy to make a mess of your system with a typo
at the command line. Also, if you're the root user and you acidentally run
some malicious code, it can reek havock (not such an issue for OS-X as
Windows, but still an issue).
However, obviously some things do need to be done with root privileges. This
is what sudo (Super User Do) is. It lets you run a single command as the root
user. This is good, as it lets you get what you need done, but it makes it
very clear that "I am now messing with the system" you can't do it
accidentally. When working from the GUI, whenever you need to do something
that requires root privileges, a dialog is popped up, asking for your
password. Again a clear sign that you are messing with the system. If you
were to download a virus accidentally as an email, a dialog would pop up and
ask you for your password, and you know immediately that something was going
on you didn't expect.
So, on OS-X being an "admin" user only means that you are allowed to use sudo.
Contrast this with Windows: an "admin" user can do anything, including
accidentally run a virus or something that destroys theire system. However,
if you run as a non-admin user, then you can't do anything administrative
without loggin out, l then back in as the admin. This is a such a pain that
many people just run as admin user all the time. couple this with poorly
written software that requires you to run as an admin user (we have some of
this in-house!) and hardly anyone doesn't run as an admin user, and surprise
surprise! viruses galore!
Wow! I got carried away with that!
> At least I got this far.
I'll be interested in what you come up with, I think our needs are similar.
Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG