[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Sparemint "cat", "aclocal" & "autoheader" broken?



Hi,

I thought to try building "cgdb", a ncurses UI for Gdb,
as it needs just ncurses, readline, gcc & make:
	http://cgdb.github.com/

I have a sparemint setup [1] in Aranym, but my efforts to
build "cgdb" with the included build files failed miserably.

Its build uses autotools to configure itself to the build
environment, but configure script failed apparently because
"cat" didn't understanding arguments given to it:
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext

Although Sparemint's "cat --help" states:
	With no FILE, or when FILE is -, read standard input.

What I get with configure is:
	cat -: No such file or directory

As a result, generated conftest.c didn't build with GCC...


Next I tried installing autoconf, automake, m4 and perl from
Sparemint and re-generating the configure script.

However, running aclocal & autoheader fail because Perl fails:
----
Subroutine DynaLoader::dl_error redefined at /usr/lib/perl5/5.6.0/m68k-
atari-mint/DynaLoader.pm line 93.
Subroutine DynaLoader::dl_error redefined at /usr/lib/perl5/5.6.0/m68k-
atari-mint/DynaLoader.pm line 93.
autom4te: cannot lock autom4te.cache/requests with mode 2: Function not 
implemented
autom4te: cannot truncate autom4te.cache/requests at 0: Function not 
implemented
aclocal: autom4te failed with exit status: 1
----

Some perl scripts coming with Perl package work fine, so Perl
itself isn't broken, just something aclocal & autoheader do.

Any idea why?


	- Eero

PS. If somebody is interested to build "cgdb", I wrote a minimal
Makefile for that, and set config.h defines to (hopefully)
correct values for MiNTlib.

Source code needed also some small changes to get it build with
GCC 2.x and Readline stuff would need a real fix (code used some
functions that didn't exist in Sparemint Readline which I've
just commented out), but at least the result is able to run Gdb...
:-)

The necessary files are attached in case somebody's interested to
continue with it, I don't myself have any additional use or interest
in it.  The cgdb tarball I used is this:
	http://cgdb.me/files/cgdb-0.6.7.tar.gz


[1] I don't have RPM database or use RPM tools, I just
    extract Sparemint package contents with rpm2cpio
 	after checking that their scriptlets don't have anything
	"interesting".

Attachment: config.h.gz
Description: GNU Zip compressed data

Attachment: cgdb.diff.gz
Description: GNU Zip compressed data

NAME = cgdb

# add include paths for all dirs with headers
INCS := $(shell find -name '*.h' | sed -e 's%/[^/]*$$%%' -e 's/^/-I/' | sort -u)
DEFS := -DHAVE_CONFIG_H=1 -DPKGDATADIR=\"/usr/share/doc/$(NAME)\"

# add as sources all C-files in cgdb & lib dirs, except for test drivers
SRCS := $(shell find cgdb lib -name '*.c' | fgrep -v -e testsuite -e driver.c)
OBJS := $(patsubst %.c, %.o, $(SRCS))

CFLAGS = $(DEFS) $(INCS) -O2 -Wall
LIBS = -lncurses -lreadline -ltermcap -lm

CC = gcc

all: cgdb/$(NAME)

cgdb/$(NAME): $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)

clean:
	$(RM) $(OBJS)