public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* unison-2.48 build fails with latest ocaml and flexdll
@ 2016-04-21 19:17 Andrew Schulman
  2016-04-26 19:47 ` unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien) Andrew Schulman
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2016-04-21 19:17 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-21 19:17 unison-2.48 build fails with latest ocaml and flexdll Andrew Schulman
@ 2016-04-26 19:47 ` Andrew Schulman
  2016-04-26 20:16   ` Achim Gratz
  2016-04-28  8:03   ` Marco Atzeri
  0 siblings, 2 replies; 18+ messages in thread
From: Andrew Schulman @ 2016-04-26 19:47 UTC (permalink / raw)
  To: cygwin-apps

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-26 19:47 ` unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien) Andrew Schulman
@ 2016-04-26 20:16   ` Achim Gratz
  2016-04-27  9:16     ` Andrew Schulman
  2016-04-28  8:03   ` Marco Atzeri
  1 sibling, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2016-04-26 20:16 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-26 20:16   ` Achim Gratz
@ 2016-04-27  9:16     ` Andrew Schulman
  2016-04-27 11:16       ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2016-04-27  9:16 UTC (permalink / raw)
  To: cygwin-apps

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-27  9:16     ` Andrew Schulman
@ 2016-04-27 11:16       ` Achim Gratz
  0 siblings, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2016-04-27 11:16 UTC (permalink / raw)
  To: cygwin-apps

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.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-26 19:47 ` unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien) Andrew Schulman
  2016-04-26 20:16   ` Achim Gratz
@ 2016-04-28  8:03   ` Marco Atzeri
  2016-04-29 16:03     ` Andrew Schulman
  1 sibling, 1 reply; 18+ messages in thread
From: Marco Atzeri @ 2016-04-28  8:03 UTC (permalink / raw)
  To: cygwin-apps

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








^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-28  8:03   ` Marco Atzeri
@ 2016-04-29 16:03     ` Andrew Schulman
  2016-04-29 19:32       ` Mark Geisert
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2016-04-29 16:03 UTC (permalink / raw)
  To: cygwin-apps

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-29 16:03     ` Andrew Schulman
@ 2016-04-29 19:32       ` Mark Geisert
  2016-04-29 19:43         ` Mark Geisert
  2016-04-30 11:54         ` Andrew Schulman
  0 siblings, 2 replies; 18+ messages in thread
From: Mark Geisert @ 2016-04-29 19:32 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-29 19:32       ` Mark Geisert
@ 2016-04-29 19:43         ` Mark Geisert
  2016-04-30 11:54         ` Andrew Schulman
  1 sibling, 0 replies; 18+ messages in thread
From: Mark Geisert @ 2016-04-29 19:43 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-29 19:32       ` Mark Geisert
  2016-04-29 19:43         ` Mark Geisert
@ 2016-04-30 11:54         ` Andrew Schulman
  2017-02-24 18:15           ` Andrew Schulman
  1 sibling, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2016-04-30 11:54 UTC (permalink / raw)
  To: cygwin-apps

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2016-04-30 11:54         ` Andrew Schulman
@ 2017-02-24 18:15           ` Andrew Schulman
  2017-03-27 21:50             ` Yaakov Selkowitz
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2017-02-24 18:15 UTC (permalink / raw)
  To: cygwin-apps

> > 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2017-02-24 18:15           ` Andrew Schulman
@ 2017-03-27 21:50             ` Yaakov Selkowitz
  2017-03-31 17:00               ` Andrew Schulman
  0 siblings, 1 reply; 18+ messages in thread
From: Yaakov Selkowitz @ 2017-03-27 21:50 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien)
  2017-03-27 21:50             ` Yaakov Selkowitz
@ 2017-03-31 17:00               ` Andrew Schulman
  2017-04-03  2:23                 ` unison-2.48 build fails with latest ocaml and flexdll (attn: Achim) Yaakov Selkowitz
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2017-03-31 17:00 UTC (permalink / raw)
  To: cygwin-apps

> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)
  2017-03-31 17:00               ` Andrew Schulman
@ 2017-04-03  2:23                 ` Yaakov Selkowitz
  2017-04-03  6:23                   ` Achim Gratz
  2017-04-03 17:12                   ` Andrew Schulman
  0 siblings, 2 replies; 18+ messages in thread
From: Yaakov Selkowitz @ 2017-04-03  2:23 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)
  2017-04-03  2:23                 ` unison-2.48 build fails with latest ocaml and flexdll (attn: Achim) Yaakov Selkowitz
@ 2017-04-03  6:23                   ` Achim Gratz
  2017-04-08 17:42                     ` Achim Gratz
  2017-04-03 17:12                   ` Andrew Schulman
  1 sibling, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2017-04-03  6:23 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)
  2017-04-03  2:23                 ` unison-2.48 build fails with latest ocaml and flexdll (attn: Achim) Yaakov Selkowitz
  2017-04-03  6:23                   ` Achim Gratz
@ 2017-04-03 17:12                   ` Andrew Schulman
  2017-04-03 17:23                     ` Yaakov Selkowitz
  1 sibling, 1 reply; 18+ messages in thread
From: Andrew Schulman @ 2017-04-03 17:12 UTC (permalink / raw)
  To: cygwin-apps

> > 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)
  2017-04-03 17:12                   ` Andrew Schulman
@ 2017-04-03 17:23                     ` Yaakov Selkowitz
  0 siblings, 0 replies; 18+ messages in thread
From: Yaakov Selkowitz @ 2017-04-03 17:23 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: unison-2.48 build fails with latest ocaml and flexdll (attn: Achim)
  2017-04-03  6:23                   ` Achim Gratz
@ 2017-04-08 17:42                     ` Achim Gratz
  0 siblings, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2017-04-08 17:42 UTC (permalink / raw)
  To: cygwin-apps

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-04-08 17:42 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21 19:17 unison-2.48 build fails with latest ocaml and flexdll Andrew Schulman
2016-04-26 19:47 ` unison-2.48 build fails with latest ocaml and flexdll (ping: Yaakov, Damien) Andrew Schulman
2016-04-26 20:16   ` Achim Gratz
2016-04-27  9:16     ` Andrew Schulman
2016-04-27 11:16       ` Achim Gratz
2016-04-28  8:03   ` Marco Atzeri
2016-04-29 16:03     ` Andrew Schulman
2016-04-29 19:32       ` Mark Geisert
2016-04-29 19:43         ` Mark Geisert
2016-04-30 11:54         ` Andrew Schulman
2017-02-24 18:15           ` Andrew Schulman
2017-03-27 21:50             ` Yaakov Selkowitz
2017-03-31 17:00               ` Andrew Schulman
2017-04-03  2:23                 ` unison-2.48 build fails with latest ocaml and flexdll (attn: Achim) Yaakov Selkowitz
2017-04-03  6:23                   ` Achim Gratz
2017-04-08 17:42                     ` Achim Gratz
2017-04-03 17:12                   ` Andrew Schulman
2017-04-03 17:23                     ` Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).