Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 4.4 on Snow Leopard

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro 4.4 on Snow Leopard
Felix-The-Ghost
Member #9,729
April 2008
avatar

Honestly, I don't remember. Its seems like I would (I know what it does) but I guess I didn't or it didn't work. Is it too late to do it?

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

OnlineCop
Member #7,919
October 2006
avatar

Mine would always fail on "make install" if the directories didn't exist first. Of course, I always compile from the Terminal instead of XCode, so I don't know how to check for "oops: couldn't install in that location..."

I have to manually "mkdir /usr/local/", "mkdir /usr/local/lib/", etc. Then when I run "sudo make install" (/usr has to have admin privileges to write into), things work.

Felix-The-Ghost
Member #9,729
April 2008
avatar

But I mean isn't it too late now that I've closed the Terminal and restarted, etc? Would a manually copy/paste be fine (Are they all in one directory)
Edit:Some of the examples are impossible to experience...no timing = thousands of frames per second.
EditEdit:
I manually copied

libaldat.a
liballeg-main.a
liballeg.4.4.0.dylib
liballeg.4.4.dylib
liballeg.dylib
liballeggl.a
libjpgalleg.a
libloadpng.a

to '/Developer/usr/lib'
Not sure how to configure Code::Blocks.
screenshot20100224at915.th.png
screenshot20100224at915y.th.png
?????????

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

But I mean isn't it too late now that I've closed the Terminal and restarted, etc? Would a manually copy/paste be fine (Are they all in one directory)

Don't ask, just try it. The worst that can happen is that it doesn't work.

And no, it doesn't matter if you closed the terminal first (you're not setting any environment variables so how could it?) or copy the files manually.

Felix-The-Ghost
Member #9,729
April 2008
avatar

sudo didn't work. I couldn't make the usr/local etc...
We didn't know whose password to use for sudo.
I think there's a whole set in 'Developer\usr' though -- not sure if it's the same.
and was it 'usr' or the name of the user the type in the Terminal?

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

sudo didn't work. I couldn't make the usr/local etc...
We didn't know whose password to use for sudo.

So try a couple. Really, there's only 2 passwords it could be, yours or root (and that's assuming you enabled the root account, which I guess you probably haven't).
The worst that will happen is that it'll tell you that you typed an incorrect password.
And remember, it's /usr/local

Quote:

I think there's a whole set in 'Developer\usr' though -- not sure if it's the same.

Of course it isn't. /Developer is a different directory.

Quote:

and was it 'usr' or the name of the user the type in the Terminal?

usr

Felix-The-Ghost
Member #9,729
April 2008
avatar

I did not mean to imply we did not try. I meant to imply 'We tried, but it didn't accept any of our passwords'

I can get to usr in Firefox by typing it in but not sure how/if I can open it in finder so I can make a new folder myself.

Quote:

Last login: Wed Feb 24 10:44:00 on ttys000
D60-MAC-07:~ sstutzman$ cd usr
D60-MAC-07:usr sstutzman$ mkdir local/
mkdir: local/: Permission denied
D60-MAC-07:usr sstutzman$ pwd
/usr
D60-MAC-07:usr sstutzman$ cd local/
-bash: cd: local/: No such file or directory
D60-MAC-07:usr sstutzman$ mkdir local/
mkdir: local/: Permission denied
D60-MAC-07:usr sstutzman$ sudo mkdir local/

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
sstutzman is not in the sudoers file. This incident will be reported.
D60-MAC-07:usr sstutzman$ sudo mkdir local/

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Sorry, try again.
sudo: 3 incorrect password attempts
D60-MAC-07:usr sstutzman$

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Arthur Kalliokoski
Second in Command
February 2005
avatar

We didn't know whose password to use for sudo.

Is there a file called /etc/sudoers ? Can you view it? If it's there and you can't view it, maybe you could boot a live CD to view it. Maybe also try 'su' command.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Felix-The-Ghost
Member #9,729
April 2008
avatar

We tried su. Switching to myself didn't work :p
Neither did anything else.

Can't find etc. in Mac. I know where it is in Linux, but it's hidden or something in Mac.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Arthur Kalliokoski
Second in Command
February 2005
avatar

Does this web page help?
http://support.apple.com/kb/HT1528

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Felix-The-Ghost
Member #9,729
April 2008
avatar

Errm. Just following along with it a bit I see where it says 'enable root user' only it's a shadowed out 'disable root user' (Shadowed out since no admin) so I assume it's already enabled.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

I can get to usr in Firefox by typing it in but not sure how/if I can open it in finder so I can make a new folder myself.

Open the hard drive in the "Devices" category in the side bar of the finder window. That takes you to the root directory. Alternatively hit command-up a couple of times to go up in the directory structure.

Quote:

sstutzman is not in the sudoers file. This incident will be reported.

That's the real problem you need to fix. I'm guessing it's /private/etc/sudoers.

Felix-The-Ghost
Member #9,729
April 2008
avatar

That's this 'root' directory...?
There's no usr, private, or etc, though. Searching reveals nothing.
So I can't find this file.

There is a 'Users' with my user as one in the list.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

That's this 'root' directory...?

The root directory is /, just as it is on other UNIX systems (actually, just as it is on Windows except there it's called \ instead).
If you have some Linux experience, a lot of that directly translates over to OS X.

Quote:

There's no usr, private, or etc, though. Searching reveals nothing.
So I can't find this file.

What happens if you run "locate sudoers"?
I actually have an /etc/sudoers too, so you could try looking there as well. I thought only DarwinPorts used /etc whereas OS X itself doesn't.
If the file isn't there you can make it (have a look at the manpage).

In terms of users/root account setup, I know you say that you enabled the root account. Are you sure? Is this your machine? Someone else's? Is it new, old? Did you change any of the system settings?
I don't remember ever having to do anything special to get sudo to work on OS X.

Quote:

There is a 'Users' with my user as one in the list.

No, /Users is the OS X equivalent of /home. Not what you're looking for.

Felix-The-Ghost
Member #9,729
April 2008
avatar

This is the school's computer. So is the Linux. It's probably best to just assume I have no idea of what I am doing. Locate says it needs to build a database that will take some time.

Searching for 'etc' gets only 'Etched Double Line'
There is however a 'Darwin.usr.dist' which you mentioned.

sudo would work if I knew what password it wanted.
I could maybe try that other guy's instructions for Xcode (Code::Blocks isn't that cool in Mac anyway)
Xcode doesn't let me even attempt to build though.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

This is the school's computer. So is the Linux.

Aha ok, so you don't actually have administrator permissions on the machine then? That changes things a bit.

You can install Allegro locally on your account rather than in a system-wide location. When you run ccmake (or the GUI-based alternative), look for CMAKE_INSTALL_PREFIX, which should be set to /usr/local. Change it to /Users/<your username> instead, then reconfigure and run "make install" again.
The library will now be installed in ~/lib and the header files in ~/include (~ is short for your home directory).

Quote:

Searching for 'etc' gets only 'Etched Double Line'
There is however a 'Darwin.usr.dist' which you mentioned.

Nope, has nothing to do with each other. /usr is a directory, so is /etc. You can see if it's there by looking at the contents of the root directory, either in the Finder or in the Terminal ("ls /"). If it's not there, it's not there.

Quote:

sudo would work if I knew what password it wanted.

It wants yours, but the problem is that you're not in the sudoers file, meaning you're not allowed to sudo anything. That has nothing to do with what password it wants.

OnlineCop
Member #7,919
October 2006
avatar

When Finder is open, type Command-Shift-G (letter 'G'). It opens this:

{"name":"600592","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/d\/3d4eb5d01fe03b7040287fe53bbb9879.png","w":433,"h":135,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/d\/3d4eb5d01fe03b7040287fe53bbb9879"}600592

As you can see, I've already typed in the path to go to. Then hit Go and it opens Finder in that directory.

When you install new software on your machine, your Mac usually prompts you to put in a password. That's usually the same password you'd use for the sudo command.

/usr/ is different from /Users/, and is where allegro likes to store its stuff.

./configure --help said:

By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'.

This may be what you'd want to do if you don't have a password for sudo. When the Mac you (or your friend) is using was initially installed, do you remember setting some sort of "master admin" username and/or password?

EDIT: beaten

Felix-The-Ghost
Member #9,729
April 2008
avatar

OnlineCop: That was indeed very helpful (I didn't know how to typ in where to go, now I see the 'Go' menu... :-* ' However, I guess I still need privileges to make a new folder there. I'll install to my user I guess. And I'll probably use Xcode if I can't figure out Code::Blocks (I need to configure global variables and linker settings/linked libraries)

Edit:
...Wait so it's ccmake <dir>...
I configured it to Users/me and generated but now what?

Quote:

D60-MAC-07:~ sstutzman$ make install
make: *** No rule to make target `install'. Stop.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

I configured it to Users/me and generated but now what?

Run make from within the directory where it produced the Makefile.
If it didn't produce a Makefile, check whether it made an Xcode project instead (in case of doubt, you can tell CMake to generate a Makefile by saying something along the lines of cmake -G "UNIX Makefiles", check the documentation to make sure you get the name right).

Felix-The-Ghost
Member #9,729
April 2008
avatar

How do I do that in ccmake?

I got this is cmake:

Quote:

D60-MAC-07:allegro-4.4 2 sstutzman$ cmake /Users/sstutzman/Desktop/allegro-4.4\ 2 -G "Unix Makefiles"
-- Could NOT find VORBIS (missing: OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sstutzman/Desktop/allegro-4.4 2
D60-MAC-07:allegro-4.4 2 sstutzman$

The src is in that folder on my Desktop. What are these build files? Makefiles? There's a number of them in there...what name would this one have?

-------------------------------------------------

I made a xcode project with Cmake...
the build failed with 196 errors and 359 warnings.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Evert
Member #794
November 2000
avatar

what name would this one have?

Makefile.

OnlineCop
Member #7,919
October 2006
avatar

Let me see if I understand correctly.

You downloaded the .tar.gz sources and put them on your desktop: /Users/--you--/Desktop
You opened Terminal and cd ~/Desktop/allegro-4.4/ (or whatever the allegro source was that was unarchived)
You ran "mkdir Build/ && cd Build/" then "ccmake ..", added a checkbox next to the "build frameworks" (or whatever option is specific to Mac), then specified the "build" or "create" or "generate" or "configure" or whatever option actually starts creating all of the files.
You exited ccmake and immediately (without changing directory or anything) ran "make".

That should have started compiling, along with some sort of progress of the files. They should have compiled everything under the Build/ directory you had created; they won't install anything.

Did it get that far?

Felix-The-Ghost
Member #9,729
April 2008
avatar

Pretty much -- except I tried the .zip version (Don't know why it'd mess up)
Haven't tried it in a while though but it sounds right.

When I tried the Cmake program I made an Xcode project with tons of errors and warnings. I don't remember ccmake terminal having that many and/or failing.
Also I'm missing 'Vorbis' or something -- presumably for 'Logg' which would be nice to use (Although I assume I can install it later)

I'll have to try again tomorrow.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

OnlineCop
Member #7,919
October 2006
avatar

I thought the only difference between the .zip and the .tar.gz files were the line endings, so the actual files should be nearly identical.

The 'cmake' and 'ccmake' are the same underlying program; 'ccmake' is just the graphical interface for the same thing.

I like to compile my programs all from the Terminal. So instead of creating an XCode project and makefile, I just make it for a normal Unix build, then run "make" from the console and see if it compiles. If it does, re-run 'cmake' with the flags to make it an XCode project/makefile, and see if the same errors occur.

Also, if everything compiles, but it won't let you 'make install', you're basically doing everything correctly except that you need to specify that you don't want to try to install it in the sudo-protected /usr/local/ directory: have it point to somewhere on your home directory (usually ~/ or ~/Desktop/ or some-such).

EDIT: Still trying to get this to compile for Felix.

He got the sources from Sourceforge, extracted them to his desktop: ~/Desktop/allegro-4.4/.

He opened Terminal, cd ~/Desktop/allegro-4.4/, then ran "mkdir Build/", "cd Build/", then "ccmake ..".

He toggled to Advanced mode, then changed CMAKE_INSTALL_PREFIX from /usr/local to ~/usr/local (tilde at the front). He also set WANT_FRAMEWORKS from NO to YES.

He also defined the following variables:

  export CPLUS_INCLUDE_PATH=~/usr/local/include:$CPLUS_INCLUDE_PATH
  export C_INCLUDE_PATH=~/usr/local/include:$C_INCLUDE_PATH
  export PATH=$PATH:~/usr/local/bin
  export LD_LIBRARY_PATH=~/usr/local/lib:$LD_LIBRARY_PATH

He compiled allegro and ran make install.

When that compiled and started working, he tried to compile his game. I provided a Makefile so he didn't have to recompile all the time, and got this compile error:

$ make

g++ -o "./bin/test" -W -Wall -g3 -ggdb3 -O0 -pg ./obj/Ball.o ./obj/Paddle.o ./obj/Pong.o ./obj/Powerup.o  `allegro-config --libs`

ld: warning: in /Users/sstutzman/usr/local/lib/liballeg-main.a, file is not of required architecture
ld: warning: in /Users/sstutzman/usr/local/lib/liballeg.dylib, file is not of required architecture

I had him try to add "-m32" to the end of his linking command, and it got rid of that error, but then gave him this:

$ make

g++ -o "./bin/test" -W -Wall -g3 -ggdb3 -O0 -pg -m32 ./obj/Ball.o ./obj/Paddle.o ./obj/Pong.o ./obj/Powerup.o  `allegro-config --libs`

ld: warning: in ./obj/Ball.o, file is not of required architecture
ld: warning: in ./obj/Paddle.o, file is not of required architecture
ld: warning: in ./obj/Pong.o, file is not of required architecture
ld: warning: in ./obj/Powerup.o, file is not of required architecture

We tried changing from "-m32" to "-m64", but that just gave the original error (since allegro wasn't compiled as a 64-bit).

He's running Snow Leopard (10.6). I don't get this error on Leopard (10.5), so I'm not sure what's going wrong. :-/

Felix-The-Ghost
Member #9,729
April 2008
avatar

Posting here since 'sending to top' doesn't announce new posts from the main page.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

 1   2 


Go to: