Quantcast

unison-2.48 build fails with latest ocaml and flexdll

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unison-2.48 build fails with latest ocaml and flexdll

Andrew Schulman
I'm trying to build unison 2.48.3, which worked fine the last time I tried
it, in June 2015.  Today the build fails, with "flexdll error: cannot
relocate":

>>> Compiling unison2.48-2.48.3-2.x86_64
ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
File "mkProjectInfo.ml", line 1:
Error: Error on dynamically loaded library:
/usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112

I ran /bin/rebaseall and tried again, with the same result.

Does anyone know the solution?

Thanks,
Andrew

cygwin 2.5.0-1
flexdll 0.34-1
ocaml 4.02.3-2

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
> I'm trying to build unison 2.48.3, which worked fine the last time I tried
> it, in June 2015.  Today the build fails, with "flexdll error: cannot
> relocate":
>
> >>> Compiling unison2.48-2.48.3-2.x86_64
> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
> File "mkProjectInfo.ml", line 1:
> Error: Error on dynamically loaded library:
> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
>
> I ran /bin/rebaseall and tried again, with the same result.

This is still unresolved. I can't build unison-2.48.3 on any of my Cygwin
hosts. It worked a year ago; now it doesn't. Can you help?

Thanks,
Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Achim Gratz
Andrew Schulman writes:

>> I'm trying to build unison 2.48.3, which worked fine the last time I tried
>> it, in June 2015.  Today the build fails, with "flexdll error: cannot
>> relocate":
>>
>> >>> Compiling unison2.48-2.48.3-2.x86_64
>> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
>> File "mkProjectInfo.ml", line 1:
>> Error: Error on dynamically loaded library:
>> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
>> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
>>
>> I ran /bin/rebaseall and tried again, with the same result.
>
> This is still unresolved. I can't build unison-2.48.3 on any of my Cygwin
> hosts. It worked a year ago; now it doesn't. Can you help?

Well, check where the library you've just compiled has been based to.
You can change the image-base of the compiles, see:

https://www.cygwin.com/ml/cygwin-apps/2013-05/msg00096.html


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
> Andrew Schulman writes:
> >> I'm trying to build unison 2.48.3, which worked fine the last time I tried
> >> it, in June 2015.  Today the build fails, with "flexdll error: cannot
> >> relocate":
> >>
> >> >>> Compiling unison2.48-2.48.3-2.x86_64
> >> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
> >> File "mkProjectInfo.ml", line 1:
> >> Error: Error on dynamically loaded library:
> >> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
> >> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
> >>
> >> I ran /bin/rebaseall and tried again, with the same result.
> >
> > This is still unresolved. I can't build unison-2.48.3 on any of my Cygwin
> > hosts. It worked a year ago; now it doesn't. Can you help?
>
> Well, check where the library you've just compiled has been based to.
> You can change the image-base of the compiles, see:
>
> https://www.cygwin.com/ml/cygwin-apps/2013-05/msg00096.html

Thanks, but nothing has been been compiled yet; the build fails immediately.

I'm not sure if you meant that as diagnosis or solution. It doesn't seem like a
solution.  Changing the image base of my compiles seems like an extraordinary
measure.  Unison has always built just fine OOTB before.

Thanks,
Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Achim Gratz
Andrew Schulman <schulman.andrew@...> writes:
> I'm not sure if you meant that as diagnosis or solution. It doesn't seem
like a
> solution.  Changing the image base of my compiles seems like an extraordinary
> measure.  Unison has always built just fine OOTB before.

Well, then just manually rebase unixdll.so (whatever that is for) to some
address that doesn't produce that error (and is not currently used in your
process map).  THat would at least get you over the hump of the build not
working.


Regards,
Achim.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

marco atzeri-4
In reply to this post by Andrew Schulman
On 26/04/2016 21:47, Andrew Schulman wrote:

>> I'm trying to build unison 2.48.3, which worked fine the last time I tried
>> it, in June 2015.  Today the build fails, with "flexdll error: cannot
>> relocate":
>>
>>>>> Compiling unison2.48-2.48.3-2.x86_64
>> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
>> File "mkProjectInfo.ml", line 1:
>> Error: Error on dynamically loaded library:
>> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
>> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
>>
>> I ran /bin/rebaseall and tried again, with the same result.
>
> This is still unresolved. I can't build unison-2.48.3 on any of my Cygwin
> hosts. It worked a year ago; now it doesn't. Can you help?
>
> Thanks,
> Andrew


There was an issue rebasing that file some time ago.

https://cygwin.com/ml/cygwin/2016-02/msg00410.html

I suggest at least to try a full rebase with
  /usr/bin/rebase-trigger full
and re-running setup.
I don't remember if rebaseall is rebasing from scratch or not.

Regards
Marco








Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
> On 26/04/2016 21:47, Andrew Schulman wrote:
> >> I'm trying to build unison 2.48.3, which worked fine the last time I tried
> >> it, in June 2015.  Today the build fails, with "flexdll error: cannot
> >> relocate":
> >>
> >>>>> Compiling unison2.48-2.48.3-2.x86_64
> >> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
> >> File "mkProjectInfo.ml", line 1:
> >> Error: Error on dynamically loaded library:
> >> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
> >> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
> >>
> >> I ran /bin/rebaseall and tried again, with the same result.
>
> There was an issue rebasing that file some time ago.
>
> https://cygwin.com/ml/cygwin/2016-02/msg00410.html
>
> I suggest at least to try a full rebase with
>   /usr/bin/rebase-trigger full
> and re-running setup.

Thanks for the pointer. I tried that, but unfortunately it didn't help. The
error is the same as before.

rebaseall apparently did run:

$ ll /var/cache/rebase
total 375K
-rw-r--r-- 1 ASchulma Domain Users  115 Apr 29 10:27 fullrebase.done
-rw-r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_all
-r--r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn
-rw-r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn.old
-r--r--r-- 1 ASchulma Domain Users  30K Apr 29 10:29 rebase_exe
-rw-r--r-- 1 ASchulma Domain Users  30K Apr 29 10:29 rebase_exe.old
-r--r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_lst
-rw-r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_lst.old
-r--r--r-- 1 ASchulma Domain Users  96K Apr 29 10:29 rebase_pkg
-rw-r--r-- 1 ASchulma Domain Users  96K Apr 29 10:29 rebase_pkg.old
-r--r--r-- 1 ASchulma Domain Users   31 Apr 29 10:29 rebase_user
-rw-r--r-- 1 ASchulma Domain Users    0 Jan  1  1970 rebase_user.old
-r--r--r-- 1 ASchulma Domain Users   31 Apr 29 10:29 rebase_user_exe
-rw-r--r-- 1 ASchulma Domain Users    0 Jan  1  1970 rebase_user_exe.old

And dllunix.so does seem to have been rebased:

$ grep dllunix /var/cache/rebase/rebase_all
/usr/lib/ocaml/stublibs/dllunix.so

$ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
/usr/lib/ocaml/stublibs/dllunix.so        base 0x0003eff30000 size
0x0004b000

But still every ocaml run fails with

Error: Error on dynamically loaded library:
/usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112

Any other ideas for how I can get ocaml to work?

Thanks!
Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Mark Geisert
Andrew Schulman wrote:

>> On 26/04/2016 21:47, Andrew Schulman wrote:
>>>> I'm trying to build unison 2.48.3, which worked fine the last time I tried
>>>> it, in June 2015.  Today the build fails, with "flexdll error: cannot
>>>> relocate":
>>>>
>>>>>>> Compiling unison2.48-2.48.3-2.x86_64
>>>> ocamlc -o mkProjectInfo unix.cma str.cma mkProjectInfo.ml
>>>> File "mkProjectInfo.ml", line 1:
>>>> Error: Error on dynamically loaded library:
>>>> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
>>>> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
>>>>
>>>> I ran /bin/rebaseall and tried again, with the same result.
>>
>> There was an issue rebasing that file some time ago.
>>
>> https://cygwin.com/ml/cygwin/2016-02/msg00410.html
>>
>> I suggest at least to try a full rebase with
>>    /usr/bin/rebase-trigger full
>> and re-running setup.
>
> Thanks for the pointer. I tried that, but unfortunately it didn't help. The
> error is the same as before.
>
> rebaseall apparently did run:
>
> $ ll /var/cache/rebase
> total 375K
> -rw-r--r-- 1 ASchulma Domain Users  115 Apr 29 10:27 fullrebase.done
> -rw-r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_all
> -r--r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn
> -rw-r--r-- 1 ASchulma Domain Users 2.3K Apr 29 10:29 rebase_dyn.old
> -r--r--r-- 1 ASchulma Domain Users  30K Apr 29 10:29 rebase_exe
> -rw-r--r-- 1 ASchulma Domain Users  30K Apr 29 10:29 rebase_exe.old
> -r--r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_lst
> -rw-r--r-- 1 ASchulma Domain Users  35K Apr 29 10:29 rebase_lst.old
> -r--r--r-- 1 ASchulma Domain Users  96K Apr 29 10:29 rebase_pkg
> -rw-r--r-- 1 ASchulma Domain Users  96K Apr 29 10:29 rebase_pkg.old
> -r--r--r-- 1 ASchulma Domain Users   31 Apr 29 10:29 rebase_user
> -rw-r--r-- 1 ASchulma Domain Users    0 Jan  1  1970 rebase_user.old
> -r--r--r-- 1 ASchulma Domain Users   31 Apr 29 10:29 rebase_user_exe
> -rw-r--r-- 1 ASchulma Domain Users    0 Jan  1  1970 rebase_user_exe.old
>
> And dllunix.so does seem to have been rebased:
>
> $ grep dllunix /var/cache/rebase/rebase_all
> /usr/lib/ocaml/stublibs/dllunix.so
>
> $ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
> /usr/lib/ocaml/stublibs/dllunix.so        base 0x0003eff30000 size
> 0x0004b000
>
> But still every ocaml run fails with
>
> Error: Error on dynamically loaded library:
> /usr/lib/ocaml/stublibs/dllunix.so: flexdll error: cannot relocate
> RELOC_REL32, target is too far: 0xfffffffc0f997112  0xf997112
>
> Any other ideas for how I can get ocaml to work?

This looks kind of reminiscent of issues I've run into and reported on the main
list, issues with xpdf and GMP-ECM.  I can't promise these incantations below
will work, but maybe you'll be lucky.  I suspect there's something more
widespread going on with relocations on 64-bit Cygwin but I can't pin it down.

A bald xpdf run failed with...
Cygwin runtime failure: /usr/bin/xpdf.exe: Invalid relocation.  Offset
0x2fb02bad9 at address 0x100494523 doesn't fit into 32 bits
I rebased /usr/bin/cygXt-6.dll from 0x0003fb480000 down to 0x0000fb480000, i.e.
just turn the first 3 in the address to 0, and that allowed xpdf to run.

Interestingly, rebuilding xpdf with gcc 5.3.0 made an executable that runs even
with cygXt-6.dll at its original address.  The machine instruction that provoked
the relocation error is different in a 5.3.0 object than a 4.9.2 object such as
the distributed xpdf.exe.  Might be a major clue here.

The GMP-ECM issue was another Cygwin runtime failure just like xpdf's but
involving /usr/bin/cyggmp-10.dll and I worked around that by rebasing that DLL
in similar fashion.

So for your case I'd first try rebasing flexdll.so down to 0x0000eff30000 (you
may collide with something else so pay attention to rebase complaints and try a
different address if necessary).  If that doesn't help then try rebuilding
flexdll.so with gcc 5.3.0 if it is currently being built with an older gcc.

..mark

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Mark Geisert
Mark Geisert wrote:
> the relocation error is different in a 5.3.0 object than a 4.9.2 object such as
                                                              ^^^^^ 4.8.2

> So for your case I'd first try rebasing flexdll.so down to 0x0000eff30000 (you
> may collide with something else so pay attention to rebase complaints and try a
> different address if necessary).  If that doesn't help then try rebuilding
> flexdll.so with gcc 5.3.0 if it is currently being built with an older gcc.

Mis-stated the 2nd incantation.  Try rebuilding the thing that's linking against
flexdll.so with gcc 5.3.0.

..mark

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
In reply to this post by Mark Geisert
> A bald xpdf run failed with...
> Cygwin runtime failure: /usr/bin/xpdf.exe: Invalid relocation.  Offset
> 0x2fb02bad9 at address 0x100494523 doesn't fit into 32 bits
> I rebased /usr/bin/cygXt-6.dll from 0x0003fb480000 down to 0x0000fb480000, i.e.
> just turn the first 3 in the address to 0, and that allowed xpdf to run.

So I tried this, moving dllunix.so from 0x3e6440000 down to 0xe6440000:

$ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
/usr/lib/ocaml/stublibs/dllunix.so        base 0x0003e6440000 size 0x0004b000

$ rebase -b 0xe6440000 /usr/lib/ocaml/stublibs/dllunix.so

$ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
/usr/lib/ocaml/stublibs/dllunix.so        base 0x0000e6440000 size 0x0004b000

The build still failed, so I moved it down further, to 0x06440000. After that
the build still failed but on a different DLL,
/usr/lib/ocaml/stublibs/dllcamlstr.so.  So I rebased that one too, down to
0x06510000.  And finally the build succeeded!  (Well, it still failed, but in a
source code problem, not a DLL problem.)

So thank you! to everyone who helped on this. I'm just a poor package maintainer
and this stuff is a bit over my head.

Damien: OCaml is broken OOTB in x86_64. dllunix.so and dllcamlstr.so need to be
rebased before it will work.

Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
> > A bald xpdf run failed with...
> > Cygwin runtime failure: /usr/bin/xpdf.exe: Invalid relocation.  Offset
> > 0x2fb02bad9 at address 0x100494523 doesn't fit into 32 bits
> > I rebased /usr/bin/cygXt-6.dll from 0x0003fb480000 down to 0x0000fb480000, i.e.
> > just turn the first 3 in the address to 0, and that allowed xpdf to run.
>
> So I tried this, moving dllunix.so from 0x3e6440000 down to 0xe6440000:
>
> $ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
> /usr/lib/ocaml/stublibs/dllunix.so        base 0x0003e6440000 size 0x0004b000
>
> $ rebase -b 0xe6440000 /usr/lib/ocaml/stublibs/dllunix.so
>
> $ rebase -i /usr/lib/ocaml/stublibs/dllunix.so
> /usr/lib/ocaml/stublibs/dllunix.so        base 0x0000e6440000 size 0x0004b000
>
> The build still failed, so I moved it down further, to 0x06440000. After that
> the build still failed but on a different DLL,
> /usr/lib/ocaml/stublibs/dllcamlstr.so.  So I rebased that one too, down to
> 0x06510000.  And finally the build succeeded!  (Well, it still failed, but in a
> source code problem, not a DLL problem.)

So to follow up on this old thread: The commands to make ocaml work again
in x86_64 are

rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so
rebase -b 0x06510000 /usr/lib/ocaml/stublibs/dllcamlstr.so

> Damien: OCaml is broken OOTB in x86_64. dllunix.so and dllcamlstr.so need to be
> rebased before it will work.

This is still true today. The above commands will probably have to be rerun
each time you use ocaml, since updating packages usually runs rebaseall
which undoes the above.

Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Yaakov Selkowitz
On 2017-02-24 12:15, Andrew Schulman wrote:

> So to follow up on this old thread: The commands to make ocaml work again
> in x86_64 are
>
> rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so
> rebase -b 0x06510000 /usr/lib/ocaml/stublibs/dllcamlstr.so
>
>> Damien: OCaml is broken OOTB in x86_64. dllunix.so and dllcamlstr.so need to be
>> rebased before it will work.
>
> This is still true today. The above commands will probably have to be rerun
> each time you use ocaml, since updating packages usually runs rebaseall
> which undoes the above.

Could you try this again with the OCaml 4.04.0 stack I just uploaded,
and see if this is still an issue?

--
Yaakov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)

Andrew Schulman
> On 2017-02-24 12:15, Andrew Schulman wrote:
> > So to follow up on this old thread: The commands to make ocaml work again
> > in x86_64 are
> >
> > rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so
> > rebase -b 0x06510000 /usr/lib/ocaml/stublibs/dllcamlstr.so
> >
> >> Damien: OCaml is broken OOTB in x86_64. dllunix.so and dllcamlstr.so need to be
> >> rebased before it will work.
> >
> > This is still true today. The above commands will probably have to be rerun
> > each time you use ocaml, since updating packages usually runs rebaseall
> > which undoes the above.
>
> Could you try this again with the OCaml 4.04.0 stack I just uploaded,
> and see if this is still an issue?

Yes, with OCaml 4.04.0 the build of unison2.49 still fails with

  flexdll error: cannot relocate RELOC_REL32, target is too far:
0xfffffffc185d8b5f  0x185d8b5f

Running

  rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so
  rebase -b 0x06510000 /usr/lib/ocaml/stublibs/dllcamlstr.so
 
as before fixed the flexdll error. Then I got a different build error, but
I'll ask on the unison list about that.

The build of orpie also failed, but for a different reason. It needed
ocaml-camlp4, but when I installed that and tried again I got

  ocamlopt.opt -c -pp camlp4o -I ./curses -I ./gsl -I ./units -thread
curses_assist.ml
  >> Fatal error: OCaml and preprocessor have incompatible versions

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)

Yaakov Selkowitz
On 2017-03-31 12:00, Andrew Schulman wrote:

>> On 2017-02-24 12:15, Andrew Schulman wrote:
>> Could you try this again with the OCaml 4.04.0 stack I just uploaded,
>> and see if this is still an issue?
>
> Yes, with OCaml 4.04.0 the build of unison2.49 still fails with
>
>   flexdll error: cannot relocate RELOC_REL32, target is too far:
> 0xfffffffc185d8b5f  0x185d8b5f
>
> Running
>
>   rebase -b 0x06440000 /usr/lib/ocaml/stublibs/dllunix.so
>   rebase -b 0x06510000 /usr/lib/ocaml/stublibs/dllcamlstr.so
>
> as before fixed the flexdll error.

Achim, I think /usr/lib/ocaml needs to be ignored by autorebase;
flexlink'ed DLLs are loaded very differently, and rebasing seems to
break them.

> Then I got a different build error, but
> I'll ask on the unison list about that.

Is 2.49 a stable version?  It seems neither Fedora nor Debian have
packaged it.  I was able to build the latest 2.48 OOTB, and 2.40 and
2.45 with this patch:

http://pkgs.fedoraproject.org/cgit/rpms/unison240.git/tree/unison-2.40.128-ocaml-4.04.patch

> The build of orpie also failed, but for a different reason. It needed
> ocaml-camlp4, but when I installed that and tried again I got
>
>   ocamlopt.opt -c -pp camlp4o -I ./curses -I ./gsl -I ./units -thread
> curses_assist.ml
>   >> Fatal error: OCaml and preprocessor have incompatible versions

Oops, it seems there were some old curr:/prev: tags on ocaml-camlp4.  I
removed those, so please try again with 4.04+1-1.

--
Yaakov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)

Achim Gratz
Yaakov Selkowitz writes:
> Achim, I think /usr/lib/ocaml needs to be ignored by autorebase;
> flexlink'ed DLLs are loaded very differently, and rebasing seems to
> break them.

I will be on a business trip for the rest of the week.  I can look at
excepting them, but I'd rather introduce a more general mechanism for
such things, I'll have to think about that.

The question is however if these actually work when they're not rebased
while some other library occupies their address space.  I suspect that'd
fail unless they are ASLR enabled.  Plus we need to make sure they don't
slip into the rebase space and block another Cygwin DLL trying to load
later.  Can somebody please test that?

While on the topic of ASLR, I've been experimenting with generally
making all (or most) Cygwin DLL ASLR enabled and avoid rebasing
altogether (that was triggered by some 32bit machine that I couldn't
switch over to a 3GB user VM for some reason).  It seems like that
should work, although it's unclear which subset of libraries must load
to fixed addresses (rebased or not).  Also, I'm not quite certain which
address space ASLR will use and if there's a "safe" space that it will
never occupy.  Unfortunately I haven't had much time to spend on that,
so if anybody feels inclined to try it I'll see if I can put something
into autorebase to support it.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)

Andrew Schulman
In reply to this post by Yaakov Selkowitz
> > Then I got a different build error, but
> > I'll ask on the unison list about that.
>
> Is 2.49 a stable version?  It seems neither Fedora nor Debian have
> packaged it.

Hm, you're right. I thought it was the latest beta release, but that's
2.48. Anyway, no need to worry about it here.

> > The build of orpie also failed, but for a different reason. It needed
> > ocaml-camlp4, but when I installed that and tried again I got
> >
> >   ocamlopt.opt -c -pp camlp4o -I ./curses -I ./gsl -I ./units -thread
> > curses_assist.ml
> >   >> Fatal error: OCaml and preprocessor have incompatible versions
>
> Oops, it seems there were some old curr:/prev: tags on ocaml-camlp4.  I
> removed those, so please try again with 4.04+1-1.

Build gets farther now, but fails later on complaining about caml__frame:

cd gsl && ocamlc.opt -ccopt "-I/usr/include -I/usr/include/ncurses -ggdb
-O2 -pipe -Wimplicit-function-d
eclaration
-fdebug-prefix-map=/home/ASchulma/dev/cygwin/orpie/orpie-1.5.2-2.x86_64/build=/usr/src/debug/
orpie-1.5.2-2
-fdebug-prefix-map=/home/ASchulma/dev/cygwin/orpie/orpie-1.5.2-2.x86_64/src/orpie-1.5.2=/usr/src/debug/orpie-1.5.2-2
-DHAVE_INLINE -DHAVE_FENV -g -O2" -c mlgsl_matrix_double.c
ml_curses.c:1:0: warning: -fPIC ignored for target (all code is position
independent)
 #include <caml/mlvalues.h>
 ^
In file included from mlgsl_error.c:9:0:
mlgsl_error.c: In function ‘ml_gsl_raise_exn’:
/usr/lib/ocaml/caml/memory.h:236:12: error: ‘caml__frame’ undeclared (first
use in this function)
     (void) caml__frame, \
            ^
/usr/lib/ocaml/caml/memory.h:309:3: note: in expansion of macro
‘CAMLxparam2’
   CAMLxparam2 (x, y)
   ^

This isn't actually a problem now, I was only using orpie as a test. Orpie
hasn't been updated in several years, and the source site has gone dark. So
I may never actually need to build it again. If I do, then I'll have to
solve this.

Thanks for maintaining all the ocaml packages. I see BTW that you added
ocaml-lablgtk2. Some time I'll get back to trying to package Unison with
the GTK2 GUI.

Andrew

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)

Yaakov Selkowitz
On 2017-04-03 12:11, Andrew Schulman wrote:
> Build gets farther now, but fails later on complaining about caml__frame:

Try Fedora's patchset, that should fix compatibility with 4.04:

http://pkgs.fedoraproject.org/cgit/rpms/orpie.git/tree/

> This isn't actually a problem now, I was only using orpie as a test. Orpie
> hasn't been updated in several years, and the source site has gone dark. So
> I may never actually need to build it again. If I do, then I'll have to
> solve this.

Actually, orpie currently has a dependency on libgsl0, which was
recently superseded by libgsl19, so a rebuild is needed.

> Thanks for maintaining all the ocaml packages. I see BTW that you added
> ocaml-lablgtk2. Some time I'll get back to trying to package Unison with
> the GTK2 GUI.

Feel free to borrow from Ports:

https://github.com/cygwinports-extras/unison2.40-gtk
https://github.com/cygwinports-extras/unison2.45-gtk
https://github.com/cygwinports-extras/unison2.48-gtk

Whether you want these actually separate from the command-line version
or not is up to you, of course.

--
Yaakov
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)

Achim Gratz
In reply to this post by Achim Gratz
Achim Gratz writes:
> I will be on a business trip for the rest of the week.  I can look at
> excepting them, but I'd rather introduce a more general mechanism for
> such things, I'll have to think about that.

I've just put in another exception.  A general mechanism to except
things there seems a bit too fragile to me.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Loading...