Thanks for the explanation, Tony.

Actually, I'm only investigating the feasibility of something. So weaning 
the library off posix is one possibility for us to consider.

Bill.

On Thursday, 8 October 2015 06:56:27 UTC+2, Tony Kelman wrote:
>
> When I try to ccall printf from cygwin1.dll (which should be equivalent to 
> msys-2.0.dll) from inside a cygwin mintty terminal, I get a longer error 
> message "fatal error - cygheap base mismatch detected - This problem is 
> probably due to using incompatible versions of the cygwin DLL."
>
> Loading and using 2 different C runtime libraries (the posix cygwin dll, 
> and the non-posix msvcrt used by mingw-w64) from inside the same 
> application is unlikely to work. If you need to work with libraries that 
> can only be built in a posix environment, and you can only work with them 
> via loading them into process memory (as opposed to IPC over something like 
> ZMQ, or pipes, or the filesystem), then the highest chance of success would 
> be to use a hypothetical version of Julia built against the same posix 
> environment. If libuv supported building on Cygwin (it doesn't, Cygwin does 
> not implement the asyncio posix extensions used in libuv) then there could 
> hypothetically be a Cygwin package of Julia that you would be better off 
> using for this. For now, either fix the posix-only library you're trying to 
> use so it can be built natively on Windows, or find another way to 
> communicate with it.
>
>
> On Wednesday, October 7, 2015 at 9:27:40 PM UTC-7, Bill Hart wrote:
>>
>> I understand that under normal circumstances, for least difficulties, one 
>> wants to build dlls using the mingw-w64 gcc if one wants to use it from 
>> Julia. This makes a dll which is not dependent on msys-2.0.dll.
>>
>> My question is: should I expect to be unable to use *any* dlls built 
>> using the MSYS2 gcc (if I also provide msys-2.0.dll obviously), even in 
>> theory? 
>>
>> If not, does anyone know why this is the case? depends22.exe seems to be 
>> able to open such dlls and see the symbols therein, so it seems in all 
>> respects to be a standard dll. What is different about it that makes it 
>> inaccessible from native applications like Julia?
>>
>> The question is relevant because of the large amount of software out 
>> there which absolutely relies on lots of posix stuff, and can't be built 
>> with mingw-w64. Such software needs msys-2.0.dll for the posix layer.
>>
>> Basically I just built a dll with MSYS2's gcc and whilst Julia dlopen's 
>> it, any attempt to call functions in it results in a ReadOnlyMemoryError. 
>> Somehow I thought I actually had this working in the past, but I must have 
>> misled myself somehow.
>>
>> Any help in understanding what's going on would be greatly appreciated.
>>
>> Bill.
>>
>

Reply via email to