help-gnucap
[Top][All Lists]
Advanced

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

Re: [Help-gnucap] Compiling for FreeBSD


From: alan somers
Subject: Re: [Help-gnucap] Compiling for FreeBSD
Date: Mon, 3 Apr 2017 11:30:58 -0600

On Mon, Apr 3, 2017 at 10:48 AM, al davis <address@hidden> wrote:
> 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 globals.cc to last in the list, which for
> your linker will really put it first.

Yep, that fixed it.

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

No idea.



reply via email to

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