[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie Automake Problem
From: |
Václav Haisman |
Subject: |
Re: Newbie Automake Problem |
Date: |
Fri, 1 Jul 2016 06:57:32 +0200 |
On 30 June 2016 at 03:03, JASON TILLEY <address@hidden> wrote:
> I am trying to create a Makefile.am for a package on github in order to make
> it more friendly to packaging (https://github.com/sakov/csa-c). I am having
> linking problems on my Mac. I’m sure its my complete lack of understanding of
> Automake. My make command executes the following:
>
> depbase=`echo src/csa.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I./src -g -O2 -MT src/csa.lo -MD -MP -MF $depbase.Tpo -c -o src/csa.lo
> src/csa.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/csa.lo -MD
> -MP -MF src/.deps/csa.Tpo -c src/csa.c -fno-common -DPIC -o src/.libs/csa.o
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/csa.lo -MD
> -MP -MF src/.deps/csa.Tpo -c src/csa.c -o src/csa.o >/dev/null 2>&1
> depbase=`echo src/svd.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I./src -g -O2 -MT src/svd.lo -MD -MP -MF $depbase.Tpo -c -o src/svd.lo
> src/svd.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/svd.lo -MD
> -MP -MF src/.deps/svd.Tpo -c src/svd.c -fno-common -DPIC -o src/.libs/svd.o
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/svd.lo -MD
> -MP -MF src/.deps/svd.Tpo -c src/svd.c -o src/svd.o >/dev/null 2>&1
> depbase=`echo src/minell.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I./src -g -O2 -MT src/minell.lo -MD -MP -MF $depbase.Tpo -c -o
> src/minell.lo src/minell.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/minell.lo
> -MD -MP -MF src/.deps/minell.Tpo -c src/minell.c -fno-common -DPIC -o
> src/.libs/minell.o
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/minell.lo
> -MD -MP -MF src/.deps/minell.Tpo -c src/minell.c -o src/minell.o >/dev/null
> 2>&1
> /bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o libcsa.la -rpath
> /usr/local/lib src/csa.lo src/svd.lo src/minell.lo
> libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o
> .libs/libcsa.0.dylib src/.libs/csa.o src/.libs/svd.o src/.libs/minell.o
> -g -O2 -install_name /usr/local/lib/libcsa.0.dylib -compatibility_version
> 1 -current_version 1.0 -Wl,-single_module
> libtool: link: (cd ".libs" && rm -f "libcsa.dylib" && ln -s "libcsa.0.dylib"
> "libcsa.dylib")
> libtool: link: ar cru .libs/libcsa.a src/csa.o src/svd.o src/minell.o
> libtool: link: ranlib .libs/libcsa.a
> libtool: link: ( cd ".libs" && rm -f "libcsa.la" && ln -s "../libcsa.la"
> "libcsa.la" )
> gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/csabathy-csa.o -MD -MP -MF
> src/.deps/csabathy-csa.Tpo -c -o src/csabathy-csa.o `test -f 'src/csa.c' ||
> echo './'`src/csa.c
> mv -f src/.deps/csabathy-csa.Tpo src/.deps/csabathy-csa.Po
> gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/csabathy-svd.o -MD -MP -MF
> src/.deps/csabathy-svd.Tpo -c -o src/csabathy-svd.o `test -f 'src/svd.c' ||
> echo './'`src/svd.c
> mv -f src/.deps/csabathy-svd.Tpo src/.deps/csabathy-svd.Po
> gcc -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/csabathy-minell.o -MD -MP
> -MF src/.deps/csabathy-minell.Tpo -c -o src/csabathy-minell.o `test -f
> 'src/minell.c' || echo './'`src/minell.c
> mv -f src/.deps/csabathy-minell.Tpo src/.deps/csabathy-minell.Po
> /bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 '-lm -lcsa' -o
> csabathy src/csabathy-csa.o src/csabathy-svd.o src/csabathy-minell.o libcsa.la
> libtool: link: gcc -g -O2 -o .libs/csabathy src/csabathy-csa.o
> src/csabathy-svd.o src/csabathy-minell.o -lm
> /Users/username/Downloads/csa-c-master/.libs/libcsa.dylib ./.libs/libcsa.dylib
> Undefined symbols for architecture x86_64:
> "_main", referenced from:
> implicit entry/start for main executable
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make: *** [csabathy] Error 1
>
> Does anyone know what this error means? Thanks.
Where is the Makefile.am? We need to see that to be able to diagnose your issue.
At least the '-lm -lcsa' argument on the linking command looks fishy.
--
VH
- Re: Newbie Automake Problem,
Václav Haisman <=