 |
|
 |
|
Next: YAVP: Hill Dwarf Fighter, 13 different runes
|
| Author |
Message |
External

Since: Dec 27, 2007 Posts: 3
|
(Msg. 1) Posted: Thu Dec 27, 2007 10:39 am
Post subject: cross compiling nethack Archived from groups: rec>games>roguelike>nethack (more info?)
|
|
|
Hi,
I am trying to cross compile nethack for ARM processors under Linux. I
managed to make the sources compile successfuly for x86 Linux. Here
are the things that I have changed in the /src/Makefile to use the
cross compiler. I have set
CC = arm-elf-gcc
LINK=arm-elf-ld
but when i compile, I get:
make all
( cd src ; make )
make[1]: Entering directory `/root/nethack-3.4.3/src'
touch ../src/config.h-t
arm-elf-gcc -O -I../include -c monst.c
arm-elf-gcc -O -I../include -c objects.c
make[2]: Entering directory `/root/nethack-3.4.3/util'
cc -O -I../include -c -o makedefs.o makedefs.c
cc -o makedefs makedefs.o ../src/monst.o ../src/objects.o
/usr/bin/ld: ../src/monst.o: Relocations in generic ELF (EM: 40)
.../src/monst.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [makedefs] Error 1
make[2]: Leaving directory `/root/nethack-3.4.3/util'
make[1]: *** [../util/makedefs] Error 2
make[1]: Leaving directory `/root/nethack-3.4.3/src'
make: *** [nethack] Error 2
It seems that the ld linker is still used. Do you know if there is
another variable which chooses the linker? Thanks for help.
Milan Stezka >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Oct 15, 2007 Posts: 53
|
(Msg. 2) Posted: Thu Dec 27, 2007 11:49 am
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 27, 11:39 am, stezkami....RemoveThis@seznam.cz wrote:
> Hi,
>
> I am trying to cross compile nethack for ARM processors under Linux. I
> managed to make the sources compile successfuly for x86 Linux. Here
> are the things that I have changed in the /src/Makefile to use the
> cross compiler. I have set
>
> CC = arm-elf-gcc
> LINK=arm-elf-ld
>
> but when i compile, I get:
>
> make all
> ( cd src ; make )
> make[1]: Entering directory `/root/nethack-3.4.3/src'
> touch ../src/config.h-t
> arm-elf-gcc -O -I../include -c monst.c
> arm-elf-gcc -O -I../include -c objects.c
> make[2]: Entering directory `/root/nethack-3.4.3/util'
> cc -O -I../include -c -o makedefs.o makedefs.c
> cc -o makedefs makedefs.o ../src/monst.o ../src/objects.o
> /usr/bin/ld: ../src/monst.o: Relocations in generic ELF (EM: 40)
> ../src/monst.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make[2]: *** [makedefs] Error 1
> make[2]: Leaving directory `/root/nethack-3.4.3/util'
> make[1]: *** [../util/makedefs] Error 2
> make[1]: Leaving directory `/root/nethack-3.4.3/src'
> make: *** [nethack] Error 2
>
> It seems that the ld linker is still used. Do you know if there is
> another variable which chooses the linker? Thanks for help.
>
> Milan Stezka
In the version of src/Makefile.gcc I see, those variable
names are in lowercase, cc and link, not CC and LINK. See
if that helps.
xanthian. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Dec 27, 2007 Posts: 3
|
(Msg. 3) Posted: Thu Dec 27, 2007 12:25 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 27, 8:49 pm, Kent Paul Dolan <xanth... DeleteThis @well.com> wrote:
> On Dec 27, 11:39 am, stezkami... DeleteThis @seznam.cz wrote:
>
>
>
>
>
> > Hi,
>
> > I am trying to cross compile nethack for ARM processors under Linux. I
> > managed to make the sources compile successfuly for x86 Linux. Here
> > are the things that I have changed in the /src/Makefile to use the
> > cross compiler. I have set
>
> > CC = arm-elf-gcc
> > LINK=arm-elf-ld
>
> > but when i compile, I get:
>
> > make all
> > ( cd src ; make )
> > make[1]: Entering directory `/root/nethack-3.4.3/src'
> > touch ../src/config.h-t
> > arm-elf-gcc -O -I../include -c monst.c
> > arm-elf-gcc -O -I../include -c objects.c
> > make[2]: Entering directory `/root/nethack-3.4.3/util'
> > cc -O -I../include -c -o makedefs.o makedefs.c
> > cc -o makedefs makedefs.o ../src/monst.o ../src/objects.o
> > /usr/bin/ld: ../src/monst.o: Relocations in generic ELF (EM: 40)
> > ../src/monst.o: could not read symbols: File in wrong format
> > collect2: ld returned 1 exit status
> > make[2]: *** [makedefs] Error 1
> > make[2]: Leaving directory `/root/nethack-3.4.3/util'
> > make[1]: *** [../util/makedefs] Error 2
> > make[1]: Leaving directory `/root/nethack-3.4.3/src'
> > make: *** [nethack] Error 2
>
> > It seems that the ld linker is still used. Do you know if there is
> > another variable which chooses the linker? Thanks for help.
>
> > Milan Stezka
>
> In the version of src/Makefile.gcc I see, those variable
> names are in lowercase, cc and link, not CC and LINK. See
> if that helps.
No, changing the variable names to lowercase did not help. Still the
same output.
>
> xanthian.- Hide quoted text -
>
> - Show quoted text - >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Oct 15, 2007 Posts: 53
|
(Msg. 4) Posted: Thu Dec 27, 2007 1:40 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 27, 1:25 pm, stezkami... RemoveThis @seznam.cz wrote:
> On Dec 27, 8:49 pm, Kent Paul Dolan <xanth... RemoveThis @well.com> wrote:
>
>
>
> > On Dec 27, 11:39 am, stezkami... RemoveThis @seznam.cz wrote:
>
> > > Hi,
>
> > > I am trying to cross compile nethack for ARM processors under Linux. I
> > > managed to make the sources compile successfuly for x86 Linux. Here
> > > are the things that I have changed in the /src/Makefile to use the
> > > cross compiler. I have set
>
> > > CC = arm-elf-gcc
> > > LINK=arm-elf-ld
>
> > > but when i compile, I get:
>
> > > make all
> > > ( cd src ; make )
> > > make[1]: Entering directory `/root/nethack-3.4.3/src'
> > > touch ../src/config.h-t
> > > arm-elf-gcc -O -I../include -c monst.c
> > > arm-elf-gcc -O -I../include -c objects.c
> > > make[2]: Entering directory `/root/nethack-3.4.3/util'
> > > cc -O -I../include -c -o makedefs.o makedefs.c
> > > cc -o makedefs makedefs.o ../src/monst.o ../src/objects.o
> > > /usr/bin/ld: ../src/monst.o: Relocations in generic ELF (EM: 40)
> > > ../src/monst.o: could not read symbols: File in wrong format
> > > collect2: ld returned 1 exit status
> > > make[2]: *** [makedefs] Error 1
> > > make[2]: Leaving directory `/root/nethack-3.4.3/util'
> > > make[1]: *** [../util/makedefs] Error 2
> > > make[1]: Leaving directory `/root/nethack-3.4.3/src'
> > > make: *** [nethack] Error 2
>
> > > It seems that the ld linker is still used. Do you know if there is
> > > another variable which chooses the linker? Thanks for help.
>
> > > Milan Stezka
>
> > In the version of src/Makefile.gcc I see, those variable
> > names are in lowercase, cc and link, not CC and LINK. See
> > if that helps.
>
> No, changing the variable names to lowercase did not help. Still the
> same output.
>
>
>
> > xanthian.- Hide quoted text -
>
> > - Show quoted text -
>
>
Well, the "link" variable really is the one
being used to link where the error occurs,
so your original query is answered.
Okay, a couple of other things to investigate.
Do a "which arm-elf-ld" and see if it really
resolves to /usr/bin/ld . If it does, that's
your problem, you don't have the linker you
need in your execution path, just something
diverting to the default linker.
Also, and I won't claim to know what I'm doing
here, the "spotless" and "clean" targets don't
seem to remove the *.dll dynamic link libraries,
which do seem to be built by theMakefile.gcc,
in which case you might be linking a mixed set
of load module formats. _Carefully_ set those
files aside and see if a build after a "make
spotless" works.
Beyond that, I'm out of ideas, since I'm not set
up to try doing what you are doing here myself.
xanthian. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Dec 27, 2007 Posts: 3
|
(Msg. 5) Posted: Thu Dec 27, 2007 1:45 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 27, 9:25 pm, stezkami....RemoveThis@seznam.cz wrote:
> On Dec 27, 8:49 pm, Kent Paul Dolan <xanth....RemoveThis@well.com> wrote:
>
>
>
>
>
> > On Dec 27, 11:39 am, stezkami....RemoveThis@seznam.cz wrote:
>
> > > Hi,
>
> > > I am trying to cross compile nethack for ARM processors under Linux. I
> > > managed to make the sources compile successfuly for x86 Linux. Here
> > > are the things that I have changed in the /src/Makefile to use the
> > > cross compiler. I have set
>
> > > CC = arm-elf-gcc
> > > LINK=arm-elf-ld
>
> > > but when i compile, I get:
>
> > > make all
> > > ( cd src ; make )
> > > make[1]: Entering directory `/root/nethack-3.4.3/src'
> > > touch ../src/config.h-t
> > > arm-elf-gcc -O -I../include -c monst.c
> > > arm-elf-gcc -O -I../include -c objects.c
> > > make[2]: Entering directory `/root/nethack-3.4.3/util'
> > > cc -O -I../include -c -o makedefs.o makedefs.c
> > > cc -o makedefs makedefs.o ../src/monst.o ../src/objects.o
> > > /usr/bin/ld: ../src/monst.o: Relocations in generic ELF (EM: 40)
> > > ../src/monst.o: could not read symbols: File in wrong format
> > > collect2: ld returned 1 exit status
> > > make[2]: *** [makedefs] Error 1
> > > make[2]: Leaving directory `/root/nethack-3.4.3/util'
> > > make[1]: *** [../util/makedefs] Error 2
> > > make[1]: Leaving directory `/root/nethack-3.4.3/src'
> > > make: *** [nethack] Error 2
>
> > > It seems that the ld linker is still used. Do you know if there is
> > > another variable which chooses the linker? Thanks for help.
>
> > > Milan Stezka
>
> > In the version of src/Makefile.gcc I see, those variable
> > names are in lowercase, cc and link, not CC and LINK. See
> > if that helps.
>
> No, changing the variable names to lowercase did not help. Still the
> same output.
>
>
>
>
>
> > xanthian.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
I did read the makefile more carefully to find out that I had to
define CC also in /util/Makefile and so on. Now I get some "undefined
reference" errors, but i hope that i can handle that on my own. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Nov 11, 2006 Posts: 25
|
(Msg. 6) Posted: Thu Dec 27, 2007 2:12 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 27, 10:39 am, stezkami....TakeThisOut@seznam.cz wrote:
> I am trying to cross compile nethack for ARM processors under Linux. I
> managed to make the sources compile successfuly for x86 Linux. Here
> are the things that I have changed in the /src/Makefile to use the
> cross compiler. [...]
You'll have to create your own Makefile. `makedefs' needs
to be built and run on the host while building the sources, but it
also needs to be rebuilt and run on--or at least for--the target
to process the data files for final installation. And the values
it derives for version sanity checking--in the part that runs on
the host--are likely to be wrong for the target.
That whole aspect of nethack needs to be redone to have any
chance at sane cross-compilation support, but the amount of
interest appears to be too small for anyone to bother. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Feb 17, 2005 Posts: 42
|
(Msg. 7) Posted: Sat Dec 29, 2007 1:54 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
rankin.RemoveThis@pactechdata.com wrote:
> On Dec 27, 10:39 am, stezkami....RemoveThis@seznam.cz wrote:
>> I am trying to cross compile nethack for ARM processors under Linux.
>> I managed to make the sources compile successfuly for x86 Linux. Here
>> are the things that I have changed in the /src/Makefile to use the
>> cross compiler. [...]
>
> You'll have to create your own Makefile. `makedefs' needs
> to be built and run on the host while building the sources, but it
> also needs to be rebuilt and run on--or at least for--the target
> to process the data files for final installation. And the values
> it derives for version sanity checking--in the part that runs on
> the host--are likely to be wrong for the target.
Yes, I found that when I ported Nethack onto the Psion 5 series. If you
run makedefs on the host then you get the wrong values for sanity
checking: everything runs fine but there is no protection against mixing
incompatible save files (I found that out when adding hearse support).
Eventually I changed the code which generates the savefile number to
produce the correct value even when run on the host system.
Fortunately these days you don't have jump through so many hoops: you
can use tools such as scratchbox (http://www.scratchbox.org) to
cross-compile an ARM binary and then run it (still on the x86) using
qemu emulation: see
http://www.scratchbox.org/documentation/user/scratchbox-1.0/html/tutorial.html
for an overview. Inside the scratchbox environment you can just use a
normal build environment and any generated files which have be run get
emulated. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Jun 26, 2006 Posts: 184
|
(Msg. 8) Posted: Sat Dec 29, 2007 5:06 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
stezkamilan RemoveThis @seznam.cz wrote in
news:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups.com:
> Hi,
>
> I am trying to cross compile nethack for ARM processors under Linux. I
> managed to make the sources compile successfuly for x86 Linux. Here
> are the things that I have changed in the /src/Makefile to use the
> cross compiler. I have set
>
Perhaps this might help?
http://gcc.gnu.org/wiki
Found it by way of freshmeat.net->gcc's home page and on the right side
series of links.
--
(setq (chuck nil) car(chuck) ) >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Aug 24, 2005 Posts: 275
|
(Msg. 9) Posted: Mon Dec 31, 2007 6:07 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Dec 31, 3:35 pm, chuckcar <ch... DeleteThis @nil.car> wrote:
> stezkami... DeleteThis @seznam.cz wrote innews:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups.com:
>
> > Hi,
>
> > I am trying to cross compile nethack for ARM processors under Linux. I
> > managed to make the sources compile successfuly for x86 Linux. Here
> > are the things that I have changed in the /src/Makefile to use the
> > cross compiler. I have set
>
> > CC = arm-elf-gcc
> > LINK=arm-elf-ld
>
> Also there is the CXX variable
Though you only need to worry about that if you're building the Qt
interface, as the standard nethack code doesn't use C++ >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Jun 26, 2006 Posts: 184
|
(Msg. 10) Posted: Mon Dec 31, 2007 8:02 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
stezkamilan.DeleteThis@seznam.cz wrote in
news:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups.com:
> Hi,
>
> I am trying to cross compile nethack for ARM processors under Linux. I
> managed to make the sources compile successfuly for x86 Linux. Here
> are the things that I have changed in the /src/Makefile to use the
> cross compiler. I have set
>
> CC = arm-elf-gcc
> LINK=arm-elf-ld
>
Also there is the CXX variable. Make sure you change the top-level, util
and src Makefiles to the above, since you don't have the environment
veriable (understandably of course) defined that way.
--
(setq (chuck nil) car(chuck) ) >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Aug 24, 2005 Posts: 275
|
(Msg. 11) Posted: Mon Dec 31, 2007 11:48 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Jan 1, 1:06 am, chuckcar <ch....DeleteThis@nil.car> wrote:
> "sjdevn...@yahoo.com" <sjdevn....DeleteThis@yahoo.com> wrote innews:9fb41149-58fe-4b01-b8e6-7237ea451456@l1g2000hsa.googlegroups.com:
>
>
>
> > On Dec 31, 3:35 pm, chuckcar <ch....DeleteThis@nil.car> wrote:
> >> stezkami....DeleteThis@seznam.cz wrote
> >> innews:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups.co
> >> m:
>
> >> > Hi,
>
> >> > I am trying to cross compile nethack for ARM processors under
> >> > Linux. I managed to make the sources compile successfuly for x86
> >> > Linux. Here are the things that I have changed in the /src/Makefile
> >> > to use the cross compiler. I have set
>
> >> > CC = arm-elf-gcc
> >> > LINK=arm-elf-ld
>
> >> Also there is the CXX variable
>
> > Though you only need to worry about that if you're building the Qt
> > interface, as the standard nethack code doesn't use C++
>
> No,
Yes.
> it says right in the "readmes" if you're cross-compiling to check
> the CXX variable full stop.
What readmes? CXX is not mentioned in any of the nethack source
readmes, except for the Qt-specific win/Qt/Install.Qt
If it says that in some external readme (e.g. a generic gcc cross-
compiling readme), that readme is adding flags not needed for a non-Qt
nethack build. CXX just sets which C++ compiler is used by "make",
and what options it defaults to. For non-C++ builds it's not
necessary; make will never use the CXX variable unless it encounters a
rule to build a C++ file (header or source or whatever), which Linux/
ARM nethack doesn't use outside of Qt, or unless CXX is explicitly
used in some way, which nethack only does in Qt builds and (irrelevant
to cross-compiling Linux/ARM) Beos builds. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Jun 26, 2006 Posts: 184
|
(Msg. 12) Posted: Tue Jan 01, 2008 7:06 am
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"sjdevnull@yahoo.com" <sjdevnull.RemoveThis@yahoo.com> wrote in
news:9fb41149-58fe-4b01-b8e6-7237ea451456@l1g2000hsa.googlegroups.com:
> On Dec 31, 3:35 pm, chuckcar <ch....RemoveThis@nil.car> wrote:
>> stezkami....RemoveThis@seznam.cz wrote
>> innews:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups.co
>> m:
>>
>> > Hi,
>>
>> > I am trying to cross compile nethack for ARM processors under
>> > Linux. I managed to make the sources compile successfuly for x86
>> > Linux. Here are the things that I have changed in the /src/Makefile
>> > to use the cross compiler. I have set
>>
>> > CC = arm-elf-gcc
>> > LINK=arm-elf-ld
>>
>> Also there is the CXX variable
>
> Though you only need to worry about that if you're building the Qt
> interface, as the standard nethack code doesn't use C++
>
No, it says right in the "readmes" if you're cross-compiling to check
the CXX variable full stop.
--
(setq (chuck nil) car(chuck) ) >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Aug 24, 2005 Posts: 275
|
(Msg. 13) Posted: Tue Jan 01, 2008 9:36 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Jan 1, 4:32 pm, chuckcar <ch... RemoveThis @nil.car> wrote:
> "sjdevn...@yahoo.com" <sjdevn... RemoveThis @yahoo.com> wrote innews:104ce0c5-8842-4319-b79e-942908a81e9d@t1g2000pra.googlegroups.com:
>
>
>
> > On Jan 1, 1:06 am, chuckcar <ch... RemoveThis @nil.car> wrote:
> >> "sjdevn...@yahoo.com" <sjdevn... RemoveThis @yahoo.com> wrote
> >> innews:9fb41149-58fe-4b01-b8e6-7237ea451456@l1g2000hsa.googlegroups.co
> >> m:
>
> >> > On Dec 31, 3:35 pm, chuckcar <ch... RemoveThis @nil.car> wrote:
> >> >> stezkami... RemoveThis @seznam.cz wrote
> >> >> innews:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups
> >> >> .co m:
>
> >> >> > Hi,
>
> >> >> > I am trying to cross compile nethack for ARM processors under
> >> >> > Linux. I managed to make the sources compile successfuly for x86
> >> >> > Linux. Here are the things that I have changed in the
> >> >> > /src/Makefile to use the cross compiler. I have set
>
> >> >> > CC = arm-elf-gcc
> >> >> > LINK=arm-elf-ld
>
> >> >> Also there is the CXX variable
>
> >> > Though you only need to worry about that if you're building the Qt
> >> > interface, as the standard nethack code doesn't use C++
>
> >> No,
>
> > Yes.
>
> >> it says right in the "readmes" if you're cross-compiling to check
> >> the CXX variable full stop.
>
> > What readmes? CXX is not mentioned in any of the nethack source
> > readmes, except for the Qt-specific win/Qt/Install.Qt
>
> Ok, my memory fade:
>
> in Makefile.src in /sys/unix:
>
> #
> # For cross-compiling, eg. with gcc on Linux (see also CXX further
> down): # CC = arm-linux-gcc
> #
> #
> and as is says:
>
> # The Qt and Be window systems are written in C++, while the rest of
> # NetHack is standard C. If using Qt, uncomment the LINK line here to
> get # the C++ libraries linked in.
> CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
> CXX=g++
> #LINK=g++
> # For cross-compiling, eg. with gcc on Linux (see also CC further up):
> #CXX=arm-linux-g++
> #LINK=arm-linux-gcc
>
> Note: two *different* lines. I seem to remember reading somewhere that
> the crosscompiler is part of the c++ compiler not gcc itself.
It's not. There are separate C and C++ (and other front-ends) cross-
compilers for gcc.
> Note there is no reference to QT there at all.
I'm just saying, CXX doesn't affect non-Qt builds (except on Beos).
There's no harm in having it, hence it being set unconditionally by
the Makefile (unlike LINK, which would break non-C++ builds on
machines that don't have the C++ libs installed), but it's completely
ignored unless you try to invoke a C++ compiler--which nethack's build
process doesn't do unless you're building Qt (or Beos). >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Jun 26, 2006 Posts: 184
|
(Msg. 14) Posted: Tue Jan 01, 2008 10:32 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"sjdevnull@yahoo.com" <sjdevnull DeleteThis @yahoo.com> wrote in
news:104ce0c5-8842-4319-b79e-942908a81e9d@t1g2000pra.googlegroups.com:
> On Jan 1, 1:06 am, chuckcar <ch... DeleteThis @nil.car> wrote:
>> "sjdevn...@yahoo.com" <sjdevn... DeleteThis @yahoo.com> wrote
>> innews:9fb41149-58fe-4b01-b8e6-7237ea451456@l1g2000hsa.googlegroups.co
>> m:
>>
>>
>>
>> > On Dec 31, 3:35 pm, chuckcar <ch... DeleteThis @nil.car> wrote:
>> >> stezkami... DeleteThis @seznam.cz wrote
>> >> innews:90da409a-a350-4fc4-8a0b-8c27efb9f2c7@d4g2000prg.googlegroups
>> >> .co m:
>>
>> >> > Hi,
>>
>> >> > I am trying to cross compile nethack for ARM processors under
>> >> > Linux. I managed to make the sources compile successfuly for x86
>> >> > Linux. Here are the things that I have changed in the
>> >> > /src/Makefile to use the cross compiler. I have set
>>
>> >> > CC = arm-elf-gcc
>> >> > LINK=arm-elf-ld
>>
>> >> Also there is the CXX variable
>>
>> > Though you only need to worry about that if you're building the Qt
>> > interface, as the standard nethack code doesn't use C++
>>
>> No,
>
> Yes.
>
>> it says right in the "readmes" if you're cross-compiling to check
>> the CXX variable full stop.
>
> What readmes? CXX is not mentioned in any of the nethack source
> readmes, except for the Qt-specific win/Qt/Install.Qt
>
Ok, my memory fade:
in Makefile.src in /sys/unix:
#
# For cross-compiling, eg. with gcc on Linux (see also CXX further
down): # CC = arm-linux-gcc
#
#
and as is says:
# The Qt and Be window systems are written in C++, while the rest of
# NetHack is standard C. If using Qt, uncomment the LINK line here to
get # the C++ libraries linked in.
CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
CXX=g++
#LINK=g++
# For cross-compiling, eg. with gcc on Linux (see also CC further up):
#CXX=arm-linux-g++
#LINK=arm-linux-gcc
Note: two *different* lines. I seem to remember reading somewhere that
the crosscompiler is part of the c++ compiler not gcc itself. Note there
is no reference to QT there at all.
--
(setq (chuck nil) car(chuck) ) >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
External

Since: Aug 24, 2005 Posts: 275
|
(Msg. 15) Posted: Wed Jan 02, 2008 12:11 pm
Post subject: Re: cross compiling nethack [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Jan 2, 7:58 am, chuckcar <ch... DeleteThis @nil.car> wrote:
> "sjdevn...@yahoo.com" <sjdevn... DeleteThis @yahoo.com> wrote innews:90713e0e-a4e4-4725-92d2-e7f0f320448d@n20g2000hsh.googlegroups.com:
>
>
>
> > On Jan 1, 4:32 pm, chuckcar <ch... DeleteThis @nil.car> wrote:
> >> >> it says right in the "readmes" if you're cross-compiling to check
> >> >> the CXX variable full stop.
>
> >> > What readmes? CXX is not mentioned in any of the nethack source
> >> > readmes, except for the Qt-specific win/Qt/Install.Qt
>
> >> Ok, my memory fade:
>
> >> in Makefile.src in /sys/unix:
>
> >> #
> >> # For cross-compiling, eg. with gcc on Linux (see also CXX
> >> further down): # CC = arm-linux-gcc
> >> #
> >> #
> >> and as is says:
>
> >> # The Qt and Be window systems are written in C++, while the rest of
> >> # NetHack is standard C. If using Qt, uncomment the LINK line here
> >> to get # the C++ libraries linked in.
> >> CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
> >> CXX=g++
> >> #LINK=g++
> >> # For cross-compiling, eg. with gcc on Linux (see also CC
> >> further up): #CXX=arm-linux-g++
> >> #LINK=arm-linux-gcc
>
> >> Note: two *different* lines. I seem to remember reading somewhere
> >> that the crosscompiler is part of the c++ compiler not gcc itself.
> >> Note there is no reference to QT there at all.
>
> > I'm just saying, CXX doesn't affect non-Qt builds (except on Beos).
>
> Ah, did *you* write the makefiles? My guess is no, so you do not know that.
No, but I have read them (the actual Makefile content, not the
comments), and you yourself can do something like go to the top-level
of the nethack source and look at the output of "find . -type f -
print0|xargs -0 grep CXX"
1. Install.Qt
2. Unrelated hit in a uuencoded sys/share/sounds file
3. sys/msdos/Makefile.GCC: 3 Qt lines
4. sys/winc/bootstrp.mak 2 Qt lines
5. sys/winnt/Makefile.{gcc,msc, bcc}: Qt lines
6. sys/unix/Makefile.src: The definition, the depend target, and one
qt target. The depend target actually references WINCXXSRC, which
doesn't need tinkering.
7. sys/unix/depend.awk: Which is outputting build strings, not using
CXX
8. sys/unix/Makefile.utl: Beos stuff.
> Certainly I doubt whether you have successfully compiled the arm version of
> nethack even.
I actually have (a couple years ago, but still nethack 3.4.3), as I
have 3 Linux/ARM devices (2 ipaq H3600 handhelds running familiar and
an empeg).
> > There's no harm in having it, hence it being set unconditionally by
> > the Makefile (unlike LINK, which would break non-C++ builds on
> > machines that don't have the C++ libs installed), but it's completely
> > ignored unless you try to invoke a C++ compiler--which nethack's build
> > process doesn't do unless you're building Qt (or Beos).
>
> Oh come on, I show you the *exact* lines from the src Makefile where and
> why it says you *have* to specify the arm paramater along with
> absolutely no references for the QT library and you *still* say it's
> nonsence??
Yes, and I was just trying to explain that they're misleading. But if
it makes you feel happy go ahead and set it. There's no harm in doing
so. >> Stay informed about: cross compiling nethack |
|
| Back to top |
|
 |  |
| Related Topics: | Compiling NH and S on Mac OS X 10.4 - I recently returned to NH after a couple year hiatus, and in the interim I had switched from my usual Solaris and Linux boxen to using Mac OS X on my laptop. I was dismayed to find that precompiled NH binaries assumed the Mac user's preference for a..
QT nethack - how do i view my turn count in QT nethack?
Nethack for cygwin - Does anyone have it compiled for cygwin? If so can you provide a link or email it to me? -- ..\\itch Johnston - Bearded Dragon
Anyone here play NetHack on a PSP yet? - Hello NetHack lovers. I was just wondering if anyone here has used the PC emulator for PSP (Play Station Portable) to play nethack yet?
Anyone running NetHack on PSP? - Folks, Can anyone tell me if I will be able to run the NetHack port on a new PSP (before I part with my cash)? From what I have been reading, it only worked with older firmware revisions and as I am looking to buy new, it'll probably not be old.. |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|