AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
154 stars 25 forks source link

autotools build help, not finding a library containing viewCreate #221

Closed 0wen101 closed 3 months ago

0wen101 commented 3 months ago

Hi, I'm trying to build the AmigaStarfield demo on Ubuntu. It's build system implements Autoconf Automake from GNU Autotools suite. To generate a makefile and following instructions I'm doing this :

./configure CPPFLAGS=-I/opt/amiga/gcc6/usr/include LDFLAGS=-L/opt/amiga/gcc6/usr/lib --host m68k

output :

jk@i52500k:~/AmigaStarfield$ ./configure CPPFLAGS=-I/opt/amiga/gcc6/usr/include LDFLAGS=-L/opt/amiga/gcc6/usr/lib --host m68k
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for m68k-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for m68k-m68k-amigaos-gcc... no
checking for m68k-amigaos-gcc... m68k-amigaos-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether m68k-amigaos-gcc accepts -g... yes
checking for m68k-amigaos-gcc option to accept ISO C89... none needed
checking whether m68k-amigaos-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of m68k-amigaos-gcc... gcc3
checking how to run the C preprocessor... m68k-amigaos-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking ace/managers/key.h usability... yes
checking ace/managers/key.h presence... yes
checking for ace/managers/key.h... yes
checking ace/managers/game.h usability... yes
checking ace/managers/game.h presence... yes
checking for ace/managers/game.h... yes
checking ace/utils/chunky.h usability... yes
checking ace/utils/chunky.h presence... yes
checking for ace/utils/chunky.h... yes
checking ace/managers/viewport/simplebuffer.h usability... yes
checking ace/managers/viewport/simplebuffer.h presence... yes
checking for ace/managers/viewport/simplebuffer.h... yes
checking for library containing viewCreate... no
checking for bitmap_conv... no
checking for palette_conv... no
checking for vasmm68k_mot... vasmm68k_mot
checking for dd... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
-------------------------------------------------
 Version
Compiler: '  '
Bindir: ''
Execprefix: ''
Prefix: ''
--------------------------------------------------

So while most of the items are found, it's not finding any object files ('checking for library containing viewCreate... no') even though I have built and installed ACE in that /opt/amiga/gcc6/usr/lib directory. I can see managers and utils sub folders there and all the built object files. I also build the ACE static library 'libace.a' and installed in the same folder.

Any clues ?

Not sure but I notice the built object files all have a .obj extension e.g. :

audio.c.obj  bob.c.obj     game.c.obj  key.c.obj  memory.c.obj  ptplayer.c.obj  sprite.c.obj  system.c.obj  viewport
blit.c.obj   copper.c.obj  joy.c.obj   log.c.obj  mouse.c.obj   rand.c.obj      state.c.obj   timer.c.obj

but the configure output says .o is the suffix ('checking for suffix of object files... o') .

Is it possible to use the static library in the configure script instead of individual object files maybe ?

I could try to build the other games or demo but I expect if cant find my ACE object files I wont get very far.

A makefile is actually generated above but generates lots of errors when try and build it.

thank you

tehKaiN commented 3 months ago

Hi,

I'm not a maintainer of that project, and not really used to autotools, so I can't really help you with setting that up this way. :(

I guess my idea would be to replace the automake with cmake file, which should be quite easy to write. Also migrate to using ACE as submodule since it's more robust way to do it.

Ok so I meant to give you instructions here, but that codebase have rotten away due to using old ACE version, so I've done the required changes myself and created the PR on starfield's repo: https://github.com/Ozzyboshi/AmigaStarfield/pull/1

Assuming you want to build it before it gets merged:

Lemme know if that helps and if you run into other problems!

0wen101 commented 3 months ago

thanks again KN all the support, that is awesome you created a PR there. Will give that a go.

CMake does seem maybe more approachable that GNU autotools.

0wen101 commented 3 months ago

great, that all worked perfectly. thanks again

Untitled-1