pkgsrc-Users archive

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

Re: buildlink again



On Thursday 18 December 2014 16:16:08 Joerg Sonnenberger wrote:
> On Thu, Dec 18, 2014 at 03:09:37PM +0000, Jaap Boender wrote:
> > The question: is it possible to disable buildlink reordering? Or would 
I
> > need to implement that myself? (A glance at the wrapper code 
seems to
> > suggest the latter, but I'm hoping it's not going to come to that...)
> 
> Can you be verbose on what you want to do?

Of course. I'm trying to compile pcre-ocaml, natively. This involves using 
OCaml for compilation, but linking then gets done through gcc and the 
binutils.

There is a native library, libasmrun.a, which gets statically linked to 
every OCaml executable. In the case of pcre-ocaml specifically, it also 
wants to link libpcre_stubs.so and libpcre.so, the former containing the 
C code that interfaces between OCaml and the pcre library.

With the buildlink3 code as it is, this ends up being linked in the 
following order: libasmrun.a -lpcre_stubs -lpcre. This results in an error 
about some symbols from libasmrun.a not being available.

Given that this command line is generated by ocaml, and that for 
example changing libasmrun.a to libasmrun.so would involve quite 
heavily patching that, I'd really prefer to be able to disable the 
reordering to keep to the old order, which is -lpcre_stubs -lpcre 
libasmrun.a, which compiles normally.

Is that possible/advisable/doable, do you think? (If you need more 
information such as specific command lines, I'm happy to provide them, 
but this is the gist of it.)

  Jaap
 

-- 
"Then I'll tell the truth. We're allowed to do that in emergencies."


Home | Main Index | Thread Index | Old Index