Thread overview
mscoff x86 invalid pointers
May 09, 2015
Etienne
May 09, 2015
extrawurst
May 09, 2015
Baz
May 10, 2015
Etienne Cimon
May 10, 2015
Baz
May 10, 2015
Etienne Cimon
May 11, 2015
Baz
May 09, 2015
I'm trying to compile a library that I think used to work with -m32mscoff flag before I reset my machine configurations.

https://github.com/etcimon/memutils

Whenever I run `dub test --config=32mscoff` it gives me an assertion failure, which is a global variable that already has a pointer value for some reason..

I'm wondering if someone here could test this out on their machine with v2.067.1? There's no reason why this shouldn't work, it runs fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff. Thanks!
May 09, 2015
On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
> I'm trying to compile a library that I think used to work with -m32mscoff flag before I reset my machine configurations.
>
> https://github.com/etcimon/memutils
>
> Whenever I run `dub test --config=32mscoff` it gives me an assertion failure, which is a global variable that already has a pointer value for some reason..
>
> I'm wondering if someone here could test this out on their machine with v2.067.1? There's no reason why this shouldn't work, it runs fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff. Thanks!

you can always use travis-ci to do such a job for you ;)
May 09, 2015
On Saturday, 9 May 2015 at 06:21:11 UTC, extrawurst wrote:
> On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
>> I'm trying to compile a library that I think used to work with -m32mscoff flag before I reset my machine configurations.
>>
>> https://github.com/etcimon/memutils
>>
>> Whenever I run `dub test --config=32mscoff` it gives me an assertion failure, which is a global variable that already has a pointer value for some reason..
>>
>> I'm wondering if someone here could test this out on their machine with v2.067.1? There's no reason why this shouldn't work, it runs fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff. Thanks!
>
> you can always use travis-ci to do such a job for you ;)

doesn't -m32mscoff recquire phobos to be compiled as COFF too ? I think that travis uses the official releases (win32 releases have phobos as OMF) so he can't run the unittests like that...

The dark side of the story is that you have to recompile phobos by hand with -m32mscoff...I'm not even sure that there is a option for this in the win32.mak...

May 10, 2015
On 2015-05-09 05:44, Baz wrote:
> On Saturday, 9 May 2015 at 06:21:11 UTC, extrawurst wrote:
>> On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
>>> I'm trying to compile a library that I think used to work with
>>> -m32mscoff flag before I reset my machine configurations.
>>>
>>> https://github.com/etcimon/memutils
>>>
>>> Whenever I run `dub test --config=32mscoff` it gives me an assertion
>>> failure, which is a global variable that already has a pointer value
>>> for some reason..
>>>
>>> I'm wondering if someone here could test this out on their machine
>>> with v2.067.1? There's no reason why this shouldn't work, it runs
>>> fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff.
>>> Thanks!
>>
>> you can always use travis-ci to do such a job for you ;)
>
> doesn't -m32mscoff recquire phobos to be compiled as COFF too ? I think
> that travis uses the official releases (win32 releases have phobos as
> OMF) so he can't run the unittests like that...
>
> The dark side of the story is that you have to recompile phobos by hand
> with -m32mscoff...I'm not even sure that there is a option for this in
> the win32.mak...
>

Meh, I ended up upgrading to 2.068 and everything went well. I clearly remember 2.067.1 working but spent a whole day recompiling druntime/phobos COFF versions in every configuration possible and never got it working again
May 10, 2015
On Sunday, 10 May 2015 at 04:16:45 UTC, Etienne Cimon wrote:
> On 2015-05-09 05:44, Baz wrote:
>> On Saturday, 9 May 2015 at 06:21:11 UTC, extrawurst wrote:
>>> On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
>>>> I'm trying to compile a library that I think used to work with
>>>> -m32mscoff flag before I reset my machine configurations.
>>>>
>>>> https://github.com/etcimon/memutils
>>>>
>>>> Whenever I run `dub test --config=32mscoff` it gives me an assertion
>>>> failure, which is a global variable that already has a pointer value
>>>> for some reason..
>>>>
>>>> I'm wondering if someone here could test this out on their machine
>>>> with v2.067.1? There's no reason why this shouldn't work, it runs
>>>> fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff.
>>>> Thanks!
>>>
>>> you can always use travis-ci to do such a job for you ;)
>>
>> doesn't -m32mscoff recquire phobos to be compiled as COFF too ? I think
>> that travis uses the official releases (win32 releases have phobos as
>> OMF) so he can't run the unittests like that...
>>
>> The dark side of the story is that you have to recompile phobos by hand
>> with -m32mscoff...I'm not even sure that there is a option for this in
>> the win32.mak...
>>
>
> Meh, I ended up upgrading to 2.068 and everything went well. I clearly remember 2.067.1 working but spent a whole day recompiling druntime/phobos COFF versions in every configuration possible and never got it working again

Could you tell me the way to compile druntime & phobos 32bit COFF ? Would you have some custom win32.mak to share ?
Thx.

May 10, 2015
On 2015-05-10 03:54, Baz wrote:
> On Sunday, 10 May 2015 at 04:16:45 UTC, Etienne Cimon wrote:
>> On 2015-05-09 05:44, Baz wrote:
>>> On Saturday, 9 May 2015 at 06:21:11 UTC, extrawurst wrote:
>>>> On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
>>>>> I'm trying to compile a library that I think used to work with
>>>>> -m32mscoff flag before I reset my machine configurations.
>>>>>
>>>>> https://github.com/etcimon/memutils
>>>>>
>>>>> Whenever I run `dub test --config=32mscoff` it gives me an assertion
>>>>> failure, which is a global variable that already has a pointer value
>>>>> for some reason..
>>>>>
>>>>> I'm wondering if someone here could test this out on their machine
>>>>> with v2.067.1? There's no reason why this shouldn't work, it runs
>>>>> fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff.
>>>>> Thanks!
>>>>
>>>> you can always use travis-ci to do such a job for you ;)
>>>
>>> doesn't -m32mscoff recquire phobos to be compiled as COFF too ? I think
>>> that travis uses the official releases (win32 releases have phobos as
>>> OMF) so he can't run the unittests like that...
>>>
>>> The dark side of the story is that you have to recompile phobos by hand
>>> with -m32mscoff...I'm not even sure that there is a option for this in
>>> the win32.mak...
>>>
>>
>> Meh, I ended up upgrading to 2.068 and everything went well. I clearly
>> remember 2.067.1 working but spent a whole day recompiling
>> druntime/phobos COFF versions in every configuration possible and
>> never got it working again
>
> Could you tell me the way to compile druntime & phobos 32bit COFF ?
> Would you have some custom win32.mak to share ?
> Thx.
>

I edited win64.mak, you need to change it to MODEL=32mscoff and remove all occurence of amd64/ in the file (there are 3), for both druntime and phobos. Save this to win32mscoff.mak

You need to place the phobos32mscoff.lib into dmd2/windows/lib32mscoff/ (the folder doesn't exist)
May 11, 2015
On Sunday, 10 May 2015 at 12:20:39 UTC, Etienne Cimon wrote:
> On 2015-05-10 03:54, Baz wrote:
>> On Sunday, 10 May 2015 at 04:16:45 UTC, Etienne Cimon wrote:
>>> On 2015-05-09 05:44, Baz wrote:
>>>> On Saturday, 9 May 2015 at 06:21:11 UTC, extrawurst wrote:
>>>>> On Saturday, 9 May 2015 at 00:16:28 UTC, Etienne wrote:
>>>>>> I'm trying to compile a library that I think used to work with
>>>>>> -m32mscoff flag before I reset my machine configurations.
>>>>>>
>>>>>> https://github.com/etcimon/memutils
>>>>>>
>>>>>> Whenever I run `dub test --config=32mscoff` it gives me an assertion
>>>>>> failure, which is a global variable that already has a pointer value
>>>>>> for some reason..
>>>>>>
>>>>>> I'm wondering if someone here could test this out on their machine
>>>>>> with v2.067.1? There's no reason why this shouldn't work, it runs
>>>>>> fine in DMD32/optlink  and DMD64/mscoff, just not in DMD32/mscoff.
>>>>>> Thanks!
>>>>>
>>>>> you can always use travis-ci to do such a job for you ;)
>>>>
>>>> doesn't -m32mscoff recquire phobos to be compiled as COFF too ? I think
>>>> that travis uses the official releases (win32 releases have phobos as
>>>> OMF) so he can't run the unittests like that...
>>>>
>>>> The dark side of the story is that you have to recompile phobos by hand
>>>> with -m32mscoff...I'm not even sure that there is a option for this in
>>>> the win32.mak...
>>>>
>>>
>>> Meh, I ended up upgrading to 2.068 and everything went well. I clearly
>>> remember 2.067.1 working but spent a whole day recompiling
>>> druntime/phobos COFF versions in every configuration possible and
>>> never got it working again
>>
>> Could you tell me the way to compile druntime & phobos 32bit COFF ?
>> Would you have some custom win32.mak to share ?
>> Thx.
>>
>
> I edited win64.mak, you need to change it to MODEL=32mscoff and remove all occurence of amd64/ in the file (there are 3), for both druntime and phobos. Save this to win32mscoff.mak
>
> You need to place the phobos32mscoff.lib into dmd2/windows/lib32mscoff/ (the folder doesn't exist)

Obviously there is no config for gcc-cpp...thx anyway for the tips.