<div><div dir="auto">That’s a really good point about conditional compilation / cpp in the rts across platforms. </div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 9, 2020 at 2:23 PM Brandon Allbery <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can think of a few more possibilities. Has anyone checked whether<br>
the RTS symbol is, say, conditional on non-glibc?<br>
<br>
On 7/9/20, Carter Schonwald <<a href="mailto:carter.schonwald@gmail.com" target="_blank">carter.schonwald@gmail.com</a>> wrote:<br>
> That’s a really good question!<br>
><br>
> I guess one way to narrow it down is what’s the  linker implementation on<br>
> each env? I think you can arrange to use the same ld impl on bsd and Linux<br>
> if you want, since both are elf platforms.  Are they both doing dynamic or<br>
> static linking? Are they using the same Ld implementation?  It’s certainly<br>
> strange to have there be a difference in behavior between two x64 elf<br>
> platforms,<br>
><br>
> On Thu, Jul 9, 2020 at 8:31 AM Vanessa McHale <<a href="mailto:vamchale@gmail.com" target="_blank">vamchale@gmail.com</a>> wrote:<br>
><br>
>> Fair enough, I suppose what I don't understand is: why is this only<br>
>> happening on FreeBSD (in Vagrant)? I am able to compile on Linux, Mac,<br>
>> and<br>
>> Windows!<br>
>><br>
>> Cheers,<br>
>> Vanessa McHale<br>
>> On 7/8/20 5:33 PM, Carter Schonwald wrote:<br>
>><br>
>> When binding c libraries, I often prefix a custom/unique Descriptive<br>
>> sequence  for All linker visible symbols.<br>
>><br>
>> So Eg you could do vanmach_zstdlib_ as a prefix<br>
>><br>
>> On Tue, Jun 30, 2020 at 12:32 PM Jinwoo Lee <<a href="mailto:jinwoo68@gmail.com" target="_blank">jinwoo68@gmail.com</a>> wrote:<br>
>><br>
>>> The error message seems to say why. The GHC RTS already has xxhash.c and<br>
>>> zstd also has that file. I'm not sure how to resolve this though.<br>
>>><br>
>>><br>
>>> On Mon, Jun 29, 2020 at 7:44 AM Vanessa McHale <<a href="mailto:vamchale@gmail.com" target="_blank">vamchale@gmail.com</a>><br>
>>> wrote:<br>
>>><br>
>>>> I tried linking against zstd within a Vagrant simulating FreeBSD. I get<br>
>>>> the following:<br>
>>>><br>
>>>> ld: error: duplicate symbol: XXH64<br>
>>>> >>> defined at xxhash.c<br>
>>>> >>>            xxhash.o:(XXH64) in archive<br>
>>>><br>
>>>> /home/vagrant/.cabal/store/ghc-8.8.3/zstd-0.1.2.0-c8ee757c8e8a7307779ab3cfbc91f3445940e16bbf8f9916f4c90432a0ac499e/lib/libHSzstd-0.1.2.0-c8ee757c8e8a7307779ab3cfbc91f3445940e16bbf8f9916f4c90432a0ac499e.a<br>
>>>> >>> defined at xxhash.c:693<br>
>>>> (/wrkdirs/usr/ports/lang/ghc/work/ghc-8.8.3/rts/xxhash.c:693)<br>
>>>> >>>            RTS.o:(.text.XXH64+0x0) in archive<br>
>>>> /usr/local/lib/ghc-8.8.3/rts/libHSrts.a<br>
>>>><br>
>>>> ...<br>
>>>><br>
>>>> I am using GHC version 8.8.3_1 and cabal-install 3.0 installed by 'sudo<br>
>>>> pkg install ...'<br>
>>>><br>
>>>> (I was trying to run cabal install language-dickinson)<br>
>>>><br>
>>>> Cheers,<br>
>>>> Vanessa McHale<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Haskell-Cafe mailing list<br>
>>>> To (un)subscribe, modify options or view archives go to:<br>
>>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
>>>> Only members subscribed via the mailman list are allowed to post.<br>
>>><br>
>>> _______________________________________________<br>
>>> Haskell-Cafe mailing list<br>
>>> To (un)subscribe, modify options or view archives go to:<br>
>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
>>> Only members subscribed via the mailman list are allowed to post.<br>
>><br>
>> _______________________________________________<br>
>> Haskell-Cafe mailing list<br>
>> To (un)subscribe, modify options or view archives go to:<br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
>> Only members subscribed via the mailman list are allowed to post.<br>
><br>
<br>
<br>
-- <br>
brandon s allbery kf8nh<br>
<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>
</blockquote></div></div>