[Top][All Lists]

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

Re: [Help-gnucap] Compiling for FreeBSD

From: al davis
Subject: Re: [Help-gnucap] Compiling for FreeBSD
Date: Mon, 3 Apr 2017 12:48:18 -0400

On Sun, 2 Apr 2017 23:01:54 -0600
alan somers <address@hidden> wrote:

> The gmake issue isn't too bad.  Lots of software needs gmake when
> built on FreeBSD.  The bigger problem is that gnucap requires GCC.

It shouldn't.

The default compiler in the configure scripts should be c++.  I will
change it.

> FreeBSD's default compiler is Clang, and GCC is a huge dependency to
> bring in.  It would be great if Gnucap would compile with Clang.  The
> following patch gets Gnucap to compile, but not link., with Clang.  I
> get link errors like this:
> (export LD_LIBRARY_PATH=`pwd | sed 's/apps/lib/g'`; `pwd | sed
> 's/apps/modelgen/g'`/gnucap-modelgen -cc ../d_mos1.model)
> @@#
> @@@unreachable:../../include/l_dispatcher.h:81:install
> build error: link order: dispatcher not yet constructed

Your linker is messing up the order, most likely doing in in the
reverse of the specified order, and then when the program is run,
running the static constructors in the reverse of the order specified.

So it links, but messes up when you run it.  In this case, it messed up
when running modelgen while building the plugins (apps directory).

In lib/Make1 .. try moving to last in the list, which for
your linker will really put it first.

If you can think of a portable way to deal with this, let me know.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]