[developers] compiling fftb

Woodley Packard sweaglesw at sweaglesw.org
Fri Jul 19 16:36:01 CEST 2019


It looks like you are trying to compile the "liba" dependency.  MacOS does shared libraries quite differently from Linux.  it will probably be easiest to do it as a static library; try "make liba.a"?

-Woodley


> On Jul 19, 2019, at 6:02 AM, Alexandre Rademaker <arademaker at gmail.com> wrote:
> 
> 
> Hi Woodley,
> 
> Once I follow the proper order for compile the dependencies (liba, libace, libtsdb, fftb), I got everything to work at Linux. But no success o Mac OS yet!! :-( 
> 
> Any direction?
> 
> I found that gcc-9 is the gcc installed from brew
> 
> $ gcc-9 --version
> gcc-9 (Homebrew GCC 9.1.0) 9.1.0
> Copyright (C) 2019 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> 
> These where my changes in the Makefile but I could not compile. 
> 
> $ svn diff Makefile
> Index: Makefile
> ===================================================================
> --- Makefile	(revision 40)
> +++ Makefile	(working copy)
> @@ -1,6 +1,6 @@
> -HDRS=net.h timer.h http.h web.h sql.h server.h aisle-rpc.h asta-rpc.h background.h daemon.h aside-rpc.h escape.h
> -OBJS=net.o timer.o http.o web.o sql.o server.o aisle-rpc.o asta-rpc.o background.o daemon.o aside-rpc.o escape.o
> -CC=gcc
> +HDRS=net.h timer.h http.h web.h server.h aisle-rpc.h asta-rpc.h background.h daemon.h aside-rpc.h escape.h
> +OBJS=net.o timer.o http.o web.o server.o aisle-rpc.o asta-rpc.o background.o daemon.o aside-rpc.o escape.o
> +CC=gcc-9
> CFLAGS=-g -O -shared -fPIC -pthread
> #CFLAGS=-g -pg -O -shared -fPIC -pthread
> 
> @@ -16,13 +16,13 @@
> 	cp liba.h /usr/local/include/
> 
> tests: ${OBJS} liba.h
> -	gcc -g -isystem . test.c ${OBJS} -lpq -lpthread -o test
> +	${CC} -g -isystem . test.c ${OBJS} -lpthread -o test
> 
> shared-tests:
> -	gcc -g test.c -la -o test
> +	${CC} -g test.c -la -o test
> 
> liba.so: ${OBJS} liba.h Makefile
> -	ld -shared ${OBJS} -o liba.so -lpq -lpthread
> +	ld ${OBJS} -o liba.so -lpthread
> 
> 
> The error is:
> 
> $ make
> ld net.o timer.o http.o web.o server.o aisle-rpc.o asta-rpc.o background.o daemon.o aside-rpc.o escape.o -o liba.so -lpthread
> ld: warning: No version-min specified on command line
> Undefined symbols for architecture x86_64:
>  "_main", referenced from:
>     implicit entry/start for main executable
> ld: symbol(s) not found for inferred architecture x86_64
> make: *** [liba.so] Error 1
> 
> 
> 
> Best,
> 
> --
> Alexandre Rademaker
> http://arademaker.github.io
> 
> 
> 




More information about the developers mailing list