TONPPAMF

The Official NPPAngband And NPPMoria Forum

You are not logged in.

Announcement

November 28, 2016 - NPPAngband forum has been migrated to a new host. SSL has been enabled so please use https:// if possible.

#1 2011-08-08 20:22:30

camb
Member
Registered: 2006-01-29
Posts: 707

Mac build

Has anything changed in the build process? Previous versions compiled for the Mac but the latest source code gives the following error:

======================================================
$ make -f Makefile.osx
ls: autoconf.h: No such file or directory
        CC attack.c           
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/Dp/DpHAAxCDEHOENyxg+AXq8k+++TI/-Tmp-//ccyVewEt.out
make: *** [attack.o] Error 255
======================================================

Can't see any difference between the previous and current Makefile.osxs.

Cameron

Offline

#2 2011-08-10 08:28:36

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

There shouldn't be any difference, in the mac files, or in attack.c.  Are you using the latest MAC OS?  Maybe there is a difference there?

Another possibility (inconvenient, and not a long term solution, but it would work for this once) is for you to take your old version that compiled and patch in the updated code, or just drop in the updated files.

Offline

#3 2011-08-28 01:37:47

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

No, I'm using the same Mac OS X (Snow Leopard) that I've been using to compile all previous versions.

I notice that the error message describes a call to "execvp" which appears to be a Linux command.

It also refers to the file "autoconf.h" that I can't find in this distribution or any of the previous ones I've compiled.

Could either of these be the problem?

Cameron

Offline

#4 2011-08-28 09:10:20

murphy
Member
Registered: 2007-03-17
Posts: 275

Re: Mac build

Im a linux user but dont have any experience with mac

Just looking at the makefile (Makefile.osx) this is generating the autoconf.h warning

# Check for autoconfig.h; warn on nonexistence
autoconf= $(shell ls autoconf.h)
ifneq ($(autoconf),)
CFLAGS += -DHAVE_CONFIG_H
endif

this looks harmless, my guess is you were always getting this warning, its not related to the build problem


googling for this error message

llvm-gcc-4.2: error trying to exec

gets lots of hits, so seems more likely system issue than something that comes with npp.  If you download an old version of npp that you successfully built before, from

download > archives-source

are you still able to compile it?

Last edited by murphy (2011-08-28 09:33:29)

Offline

#5 2011-09-01 09:25:43

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

Yes the previous version compiles as per usual on my machine.

You're right, the previous version also shows the "ls: autoconf.h: No such file or directory" warning but it doesn't seem to affect the compilation.

Cameron

Offline

#6 2011-09-01 09:29:18

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

The problem appears to be the call to execvp, which appears to be a Linux specific command. Not sure what triggers it for the latest version.

Cameron

Offline

#7 2011-09-01 10:33:19

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

There have not been any changes to the previous mac makefiles since 0.5.2 of which there is a working copy in the downloads section.  That change was just to change the name of the executable to NPPAagnbandIf you want to grab a makefile from NPP 0.5.1, that might work.

If you take the source changes from the latest NPP (just the .c and .h files, but nothing starting with main* or makefile*) and copy them into your old version, it should compile fine.  You would also need some changes from the lib/edit directory to actually play, as well as some new help files.

Worst case, I will finalize 0.5.3 soon.  Nick McConnel usually compiles a version for the MAC shortly thereafter.

Offline

#8 2011-09-01 10:33:43

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

camb wrote:

The problem appears to be the call to execvp, which appears to be a Linux specific command. Not sure what triggers it for the latest version.

Cameron

Where does it call execvp?

Offline

#9 2011-09-01 19:48:50

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

I don't know. Grep doesn't reveal any occurrence of "execvp" in the source code, but this is the error message I keep getting:

======================================================
$ make -f Makefile.osx
ls: autoconf.h: No such file or directory
        CC attack.c           
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/Dp/DpHAAxCDEHOENyxg+AXq8k+++TI/-Tmp-//ccyVewEt.out
make: *** [attack.o] Error 255
======================================================

Cameron

Offline

#10 2011-09-01 20:45:43

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

This is saying it simply can't locate autoconf.h, the first help file in the first file to be comipled.  The issue might be it is looking in the wrong directory.

Offline

#11 2011-09-01 21:35:51

murphy
Member
Registered: 2007-03-17
Posts: 275

Re: Mac build

camb wrote:

llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory

execvp() is a system call (a C function, if you look in /usr/include/unistd.h you'll probably see it)  My interpretation of the message is, your compiler (gcc I guess) is calling execvp() to invoke a particular compiler version (powerpc-apple-darwin10-llvm-gcc-4.2), and '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2' is where it's looking, but it doesn't find it there  (therefore, "No such file or directory")

Why is it trying to use a different version of the llvm compiler to build 0.5.3 than it used for an older build, thats what has me puzzled

If you go into the 0.5.3 src directory and type at the command line:
gcc attack.c

do you get the same message ?

Murphy S.

Last edited by murphy (2011-09-01 22:02:21)

Offline

#12 2011-09-02 09:21:40

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

>do you get the same message ?
No I don't.

Cameron

Offline

#13 2011-09-02 09:26:27

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

>This is saying it simply can't locate autoconf.h,
>the first help file in the first file to be comipled.
That's only the first line and it seems to be irrelevant. This warning also occurred in previous builds and did not stop the build.

The problem seems to be the call to execvp, which previous builds did not appear to invoke.

Cameron

Offline

#14 2011-09-02 09:43:43

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

>My interpretation of the message is, your compiler (gcc I guess) is calling execvp()
>to invoke a particular compiler version (powerpc-apple-darwin10-llvm-gcc-4.2), and
>'/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2' is where it's looking,
>but it doesn't find it there
Aha! There is indeed no file "powerpc-apple-darwin10-llvm-gcc-4.2" at that location but there is "i686-apple-darwin10-llvm-gcc-4.2" which I assume needs to be called instead.

Temporarily fixed the problem by installing an older version of XCode, the latest NPP code now compiles. Not a good solution though as I'll need to restore the latest XCode for any iOS work.

Thanks for your help guys.

Cameron

Last edited by camb (2011-09-02 11:16:50)

Offline

#15 2011-09-03 15:07:49

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

Glad you got it working.  It might be worth posting the question at angband.oook.  I am sure there are plenty of people there that have compiled using the latest version of Xcode.  Maybe something in the makefile can be changed instead of you having to install old versions of Xcode every time.

Offline

#16 2011-10-18 03:01:15

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

Hi,

Problem solved! Nick sent me his Makefile.osx from FAngband and it works for the latest OS X (Lion) and the latest XCode (4.2).

Cameron

Offline

#17 2011-10-18 04:48:49

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

Great!  Should I replace the one in NPP with the one he sent you?

Offline

#18 2011-10-18 10:32:39

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

Not sure - it compiles to Angband.app not NPPAngband.app so there may be some conflict for people who want to play both.

Cameron

Offline

#19 2011-10-18 14:36:10

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

Still, I will compare the two and see what he did differently.  There might be another part of the makefile that was changed besides the directory the game compiles to.

Offline

#20 2011-11-19 12:38:03

jujuben
Member
Registered: 2011-11-19
Posts: 1

Re: Mac build

The pre-compiled version (0.5.3 off the website, running on OSX 10.6.8) is acting *very* weird for me.  Runs and plays just fine as long as I don't close anything, but cannot open files.  Trying to open either saved games or pref files just doesn't seem to work.  Saved games appear grayed out on the load game menu, and entering a pref file from that prompt just does nothing.  Opening a saved game from the "Open Recent" menu works fine, though...

Last edited by jujuben (2011-11-19 12:40:18)

Offline

#21 2011-11-20 02:37:41

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

It appears to maintain the save file under the name of the first character it was generated for, then maintain future characters in the same file. I just use "Open Recent" to get my latest game up.

Haven't had any problems with pref files, and can load squelch settings as per usual on my machines (OSX Snow Leopard and Lion).

Cameron

Offline

#22 2011-11-30 13:57:00

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

The new code gives the following errors when compiling for Mac:

main-crb.c:3618: error: ‘Cursor’ undeclared (first use in this function)
main-crb.c:3618: error: (Each undeclared identifier is reported only once
main-crb.c:3618: error: for each function it appears in.)
main-crb.c:3618: error: expected ‘;’ before ‘tempCursor’
main-crb.c:3619: warning: implicit declaration of function ‘SetCursor’
main-crb.c:3619: warning: implicit declaration of function ‘GetQDGlobalsArrow’
main-crb.c:3619: error: ‘tempCursor’ undeclared (first use in this function)
main-crb.c: In function ‘main’:
main-crb.c:3906: warning: implicit declaration of function ‘InitCursor’
main-crb.c:3925: warning: implicit declaration of function ‘GetCursor’
main-crb.c:3925: error: ‘watchCursor’ undeclared (first use in this function)
main-crb.c:3925: error: invalid type argument of ‘unary *’
main-crb.c:3952: error: ‘Cursor’ undeclared (first use in this function)
main-crb.c:3952: error: expected ‘;’ before ‘tempCursor’
main-crb.c:3953: error: ‘tempCursor’ undeclared (first use in this function)

Presumably these are to do with the new mouse support. I noticed this code in Makefile.win:

  #PDCURSES_INC = ../../pdcurses/include
  #PDCURSES_LIB = ../../pdcurses/lib/pdcurses.a

Problem?

Cameron

Last edited by camb (2011-11-30 14:00:18)

Offline

#23 2011-11-30 16:01:25

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

Camb,

I do not know, because neither makefile.win or main-crb has been modified in several months.  Neither of them required, or should have, needed modification for the addition of mouse support. All fo the undeclared variables and commands are unique to the main-crb port, and those commands are not found in the other ports.

I also noticed the line numbers were noticably different than the most current main-crb.c.  Are you using the one that comes along with the source code?

Offline

#24 2011-11-30 17:23:09

camb
Member
Registered: 2006-01-29
Posts: 707

Re: Mac build

Yes.

But not the Makefile.osx that comes with the distribution, it fails to compile a single file. I'm using the Makefile.osx from FAngband that Nick sent me recently, which worked for the last NPP release for Mac OS X builds.

Cameron

Last edited by camb (2011-11-30 17:32:09)

Offline

#25 2011-11-30 18:47:59

NPPAngband
NPPAngband Maintainer
Registered: 2004-07-01
Posts: 1,647
Website

Re: Mac build

I can think of a couple ways to proceed. 

1) Can you please send me Nick's makefile?
2) You can ask the question on .oook and hopefully NIck will responsd.  Nick just compiled a special version of NPP for the comp, and AFAIK he didn't have any issues.
3) You can also try to contact Nick directly.  He is quite good about helping Angbanders in need.
4) Buy me a Macbook pro and I will get it working. smile

{Just kidding on that last one, but it's worth a shot just in case you are independently wealthy.}

Offline

Board footer

Powered by FluxBB