[developers] compiling fftb

goodman.m.w at gmail.com goodman.m.w at gmail.com
Fri May 15 08:50:22 CEST 2020


Hi Woodley,

(I re-added the developers list on CC so they can see the fix)

Moving -lm to after -Wl,-Bdynamic did the trick. Strangely, once I did that
and `make all && make install` for libtsdb, the other errors went away. Not
sure if they were related or something else changed on my system in the
meantime. And as you said, this also fixed the compiling of FFTB for me.

Cheers,

On Thu, May 14, 2020 at 1:14 AM Woodley Packard <sweaglesw at sweaglesw.org>
wrote:

> Hi Mike,
>
> The errors while compiling test.static and friends do appear to be related
> to the stack overflow thread you found.  Fortunately those binaries are not
> required; you should be able to use the dynamic ones just fine.  If you
> want the ones that have the support libraries compiled in statically, I
> recommend moving -lm from inside of the static link block in
> TOOL_STATIC_LDFLAGS to after the -Wl,-Bdynamic.  I've done that at my end
> now; thanks for the report.  The same should work for the LIBS setting for
> FFTB's Makefile.
>
> The error you're seeing when running art most likely is a result of your
> system's shared library search path not including /usr/local/lib/.  Your
> options would be to put libace.so somewhere your system expects to find it
> or add that path.  To do that latter, you can edit /etc/ld.so.conf or
> /etc/ld.so.conf.d/, or use LD_LIBRARY_PATH.
>
> Let me know if that helps resolve the issues at your end.
>
> Thanks,
> Woodley
>
> On May 12, 2020, at 12:55 AM, goodman.m.w at gmail.com wrote:
>
> Hi all,
>
> I'm getting similar errors to Alexandre. I successfully compiled and
> installed liba, repp-0.2.2, and then ace, but I'm getting the error that it
> cannot find <tsdb.h> I try "make all" for libtsdb. I noticed that tsdb.h is
> provided by libtsdb, and `#include <tsdb.h>` seems to look in my system
> libraries. Changing all these to `#include "tsdb.h"` (thinking it might use
> the file in the current directory) did not work, so I reverted those
> changes and ran the following:
>
>     make libtsdb.a  # required for 'make install'
>     make libtsdb.so  # required for 'make install'
>     make install  # copies the above 2 things plus tsdb.h to
> /usr/local/lib/
>
> Then I tried running "make all" again and now I see this:
>
>     [...]
>     test.c: In function ‘main’:
>     test.c:599:2: warning: implicit declaration of function
> ‘ace_load_grammar’ [-Wimplicit-function-declaration]
>       599 |
>  ace_load_grammar("/home/sweaglesw/cdev/ace-regression/comparison.dat");
>           |  ^~~~~~~~~~~~~~~~
>     /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.31.a(e_exp.o): in
> function `__ieee754_exp_ifunc':
>     (.text+0x246): undefined reference to `_dl_x86_cpu_features'
>     /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libm-2.31.a(e_log.o): in
> function `__ieee754_log_ifunc':
>     (.text+0x2c6): undefined reference to `_dl_x86_cpu_features'
>     collect2: error: ld returned 1 exit status
>     make: *** [Makefile:45: test.static] Error 1
>
> It seems there's some incompatibility in glibc versions. This SO question
> seems relevant: https://stackoverflow.com/q/56415996/1441112 ; maybe it's
> a static vs. dynamic linking issue? Other than test.static, I was able to
> make other targets, such as art and mkprof, but I see errors when I try to
> run them:
>
>     $ ./art -h
>     ./art: error while loading shared libraries: libace.so: cannot open
> shared object file: No such file or directory
>
> But I have libace.so at /usr/local/lib/libace.so, so I'm not sure what
> went wrong here. My end goal is to compile FFTB, and if I carry on with the
> current setup I see the same errors as when compiling test.static when I do
> "make fftb" for the FFTB source code. Does anybody know how to get around
> these issues?
>
> Some context:
> * For compiling ACE I copied itsdb_libraries.tgz as described here:
> http://moin.delph-in.net/AceInstall#Missing_itsdb.h
> * I'm running Pop!_OS 20.04 (similar to Ubuntu), with glibc version 2.31
>
>
> On Fri, Jul 19, 2019 at 10:38 PM Woodley Packard <sweaglesw at sweaglesw.org>
> wrote:
>
>> 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
>> >
>> >
>> >
>>
>>
>>
>
> --
> -Michael Wayne Goodman
>
>
>

-- 
-Michael Wayne Goodman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20200515/6aba02e1/attachment.html>


More information about the developers mailing list