header issue compiling Base

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

header issue compiling Base

Riccardo Mottola-5
Hi,


I have a very strange issue when compiling base on MinGW.

If I compile without ICU, everything is fine!

If I enable icu, I get this failure:

gcc NSError+GNUstepBase.m -c \
               -MMD -MP -Wall -Wdeclaration-after-statement
-DNO_GNUSTEP=1 -DGNUS
TEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1
-DGNUSTEP_BASE_
LIBRARY=1 -DGNUSTEP_WITH_DLL -fno-strict-aliasing
-fno-omit-frame-pointer -Wall
-DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -march=i586 -fgnu-runtime
-fgnu-runtime
  -DBUILD_libgnustep_base_DLL=1 -fconstant-string-class=NSConstantString
-I../. -
I../ -I../../Headers -I. -I/home/multix/GNUstep/Library/Headers
-I/GNUstep/Local
/Library/Headers -I/GNUstep/System/Library/Headers
-I/GNUstep/Local/Library/Head
ers -I/GNUstep/Local/Library/Headers -I/GNUstep/System/Library/Headers
-I/GNUste
p/Local/Library/Headers -IC:/GNUstep/lib/libffi-3.2.1/include
-I/mingw/include/l
ibxml2 -IC:/GNUstep/include -IC:/GNUstep/include/p11-kit-1 \

                -o obj/Additions.obj/NSError+GNUstepBase.m.o
In file included from NSData+GNUstepBase.m:27:0:
../../Headers/Foundation/NSByteOrder.h: In function 'NSSwapLong':
../../Headers/Foundation/NSByteOrder.h:361:3: error: incompatible type
for argument 1 of 'GSSwapI128'
../../Headers/Foundation/NSByteOrder.h:167:1: note: expected 'gsu128'
but argument is of type 'long unsigned int'
make[4]: *** [obj/Additions.obj/NSData+GNUstepBase.m.o] Error 1
make[4]: *** Waiting for unfinished jobs....


GSConfig.h defines:

typedef struct { gsu8 a[16]; } gsu128;

I really don't see in NSByteOrder sometthing which interacts with ICU!
what's wrong?

gsu128 is defined differently? it is not! that is with or without ICU
GSConfig.h has the same line. This confuses me.


Riccardo


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Fred Kiefer
Hi Riccardo,

could you please report back what the value of GS_SIZEOF_LONG in GSConfig.h is?
For MinGW NSSwapLong shouldn’t be calling GSSwapI128.

Fred


> Am 05.11.2017 um 18:17 schrieb Riccardo Mottola <[hidden email]>:
>
> Hi,
>
>
> I have a very strange issue when compiling base on MinGW.
>
> If I compile without ICU, everything is fine!
>
> If I enable icu, I get this failure:
>
> gcc NSError+GNUstepBase.m -c \
>               -MMD -MP -Wall -Wdeclaration-after-statement -DNO_GNUSTEP=1 -DGNUS
> TEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_
> LIBRARY=1 -DGNUSTEP_WITH_DLL -fno-strict-aliasing -fno-omit-frame-pointer -Wall
> -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -march=i586 -fgnu-runtime -fgnu-runtime
>  -DBUILD_libgnustep_base_DLL=1 -fconstant-string-class=NSConstantString -I../. -
> I../ -I../../Headers -I. -I/home/multix/GNUstep/Library/Headers -I/GNUstep/Local
> /Library/Headers -I/GNUstep/System/Library/Headers -I/GNUstep/Local/Library/Head
> ers -I/GNUstep/Local/Library/Headers -I/GNUstep/System/Library/Headers -I/GNUste
> p/Local/Library/Headers -IC:/GNUstep/lib/libffi-3.2.1/include -I/mingw/include/l
> ibxml2 -IC:/GNUstep/include -IC:/GNUstep/include/p11-kit-1 \
>
>                -o obj/Additions.obj/NSError+GNUstepBase.m.o
> In file included from NSData+GNUstepBase.m:27:0:
> ../../Headers/Foundation/NSByteOrder.h: In function 'NSSwapLong':
> ../../Headers/Foundation/NSByteOrder.h:361:3: error: incompatible type for argument 1 of 'GSSwapI128'
> ../../Headers/Foundation/NSByteOrder.h:167:1: note: expected 'gsu128' but argument is of type 'long unsigned int'
> make[4]: *** [obj/Additions.obj/NSData+GNUstepBase.m.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
>
>
> GSConfig.h defines:
>
> typedef struct { gsu8 a[16]; } gsu128;
>
> I really don't see in NSByteOrder sometthing which interacts with ICU! what's wrong?
>
> gsu128 is defined differently? it is not! that is with or without ICU GSConfig.h has the same line. This confuses me.
>
>
> Riccardo
>
>
> _______________________________________________
> Gnustep-dev mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/gnustep-dev


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Riccardo Mottola-5
HI Fred,


On 05/11/2017 18:58, Fred Kiefer wrote:
> could you please report back what the value of GS_SIZEOF_LONG in GSConfig.h is?
> For MinGW NSSwapLong shouldn’t be calling GSSwapI128.

int contains a bad value I think:

#define GS_SIZEOF_LONG          0


without ICU I got this when configuring:
#define    GS_SIZEOF_LONG        4

which makes more sense, INT = LONG in size, while LONG_LONG=8

manually changing that doesn't fix the issue, most probably other things
misconfigured.

Riccardo

_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Fred Kiefer

> Am 05.11.2017 um 22:38 schrieb Riccardo Mottola <[hidden email]>:
>
> On 05/11/2017 18:58, Fred Kiefer wrote:
>> could you please report back what the value of GS_SIZEOF_LONG in GSConfig.h is?
>> For MinGW NSSwapLong shouldn’t be calling GSSwapI128.
>
> int contains a bad value I think:
>
> #define GS_SIZEOF_LONG          0
>
>
> without ICU I got this when configuring:
> #define    GS_SIZEOF_LONG        4
>
> which makes more sense, INT = LONG in size, while LONG_LONG=8
>
> manually changing that doesn't fix the issue, most probably other things misconfigured.


Could you please provide us with a diff between GSConfig.h with and without ICU?
And it would be great to see the config.log file for the ICU case.

From a previous mail I remember that you had issues with ICU 4.6, which version are you using now and how did you install that newer release?

Fred
_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Riccardo Mottola-5
Hoi Fred



On 05/11/2017 22:52, Fred Kiefer wrote:
> Could you please provide us with a diff between GSConfig.h with and without ICU?
> And it would be great to see the config.log file for the ICU case.

It is here. One difference disappeared, since I changed GS_SIZEOF_LONG
manually.

--- /c/GNUstep/GNUstep/System/Library/Headers/GNUstepBase/GSConfig.h
2017-11-
04 16:16:39 +0100
+++ GSConfig.h  2017-11-05 22:37:41 +0100
@@ -147,7 +147,7 @@
   */
  #define        _GSC_S_SHT      _GSC_I16
  #define        _GSC_S_INT      _GSC_I32
-#define        _GSC_S_LNG      _GSC_I32
+#define        _GSC_S_LNG
  #define        _GSC_S_LNG_LNG  _GSC_I64

  /*
@@ -267,7 +267,7 @@
  #define GS_USE_GNUTLS 1
  #define GS_USE_AVAHI 0
  #define GS_USE_MDNS 0
-#define GS_USE_ICU 0
+#define GS_USE_ICU 1
  #define GS_USE_LIBDISPATCH 0
  #define GS_USE_LIBDISPATCH_RUNLOOP 0
  #define GS_HAVE_OBJC_ROOT_CLASS_ATTR 0


I tried also patching _GSC_S_LNG manually, but it does not allow
compilation to complete.

Config.log attached.

>
>  From a previous mail I remember that you had issues with ICU 4.6, which version are you using now and how did you install that newer release?

I am trying to use 51.2 which I configured "out of the box" using the
automated configure script for MinGW and using --prefix=/c/GNUstep
(which is equivalent to /, but works better under MinGW where / is kind
of virtual and has issues with path conversion as prefix)


Riccardo

_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

config.log (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Fred Kiefer

> Am 07.11.2017 um 00:29 schrieb Riccardo Mottola <[hidden email]>:
>
> On 05/11/2017 22:52, Fred Kiefer wrote:
>> Could you please provide us with a diff between GSConfig.h with and without ICU?
>> And it would be great to see the config.log file for the ICU case.
>
> It is here. One difference disappeared, since I changed GS_SIZEOF_LONG manually.
>
> --- /c/GNUstep/GNUstep/System/Library/Headers/GNUstepBase/GSConfig.h 2017-11-
> 04 16:16:39 +0100
> +++ GSConfig.h  2017-11-05 22:37:41 +0100
> @@ -147,7 +147,7 @@
>   */
>  #define        _GSC_S_SHT      _GSC_I16
>  #define        _GSC_S_INT      _GSC_I32
> -#define        _GSC_S_LNG      _GSC_I32
> +#define        _GSC_S_LNG
>  #define        _GSC_S_LNG_LNG  _GSC_I64
>
>  /*
> @@ -267,7 +267,7 @@
>  #define GS_USE_GNUTLS 1
>  #define GS_USE_AVAHI 0
>  #define GS_USE_MDNS 0
> -#define GS_USE_ICU 0
> +#define GS_USE_ICU 1
>  #define GS_USE_LIBDISPATCH 0
>  #define GS_USE_LIBDISPATCH_RUNLOOP 0
>  #define GS_HAVE_OBJC_ROOT_CLASS_ATTR 0
>
>
> I tried also patching _GSC_S_LNG manually, but it does not allow compilation to complete.
>
> Config.log attached.

If you search for "checking size of long“ in the config.log file you will see the code that failed to compile. You should extract this code and try to compile it yourself to see the actual error. That way we may be able to find out what went wrong.

The simplest solution you could try is to recreate the configure script with a newer version of autoconfig. Version 2.65 has been used here. You could do this on another machine and just transfer the generated configure file to the MinGW environment.


>> From a previous mail I remember that you had issues with ICU 4.6, which version are you using now and how did you install that newer release?
>
> I am trying to use 51.2 which I configured "out of the box" using the automated configure script for MinGW and using --prefix=/c/GNUstep (which is equivalent to /, but works better under MinGW where / is kind of virtual and has issues with path conversion as prefix)




_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Riccardo Mottola-5
Hi Fred,


On 07/11/2017 08:15, Fred Kiefer wrote:
> The simplest solution you could try is to recreate the configure script with a newer version of autoconfig. Version 2.65 has been used here. You could do this on another machine and just transfer the generated configure file to the MinGW environment.

actually, the log says there is a strange linking error. I did something
simpler: reboot the machine, clean and try again! And.... it worked.
Before that, be assured that i tried several times... very strange.

However once this hurdle was passed, I have issues with the ICU I compiled.

I am unable to compile most recent 59 and 60 versions.

Version 52 had issues, By trying version 55 I was able to compile base !

However, when launching any app, I get a popup saying that "icuin55.dll
is missing from your computer".

But it successfully linked without any additional flags... hmm? What
could be the trick?

Riccardo


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Fred Kiefer


> Am 12.11.2017 um 18:33 schrieb Riccardo Mottola <[hidden email]>:
>
> On 07/11/2017 08:15, Fred Kiefer wrote:
>> The simplest solution you could try is to recreate the configure script with a newer version of autoconfig. Version 2.65 has been used here. You could do this on another machine and just transfer the generated configure file to the MinGW environment.
>
> actually, the log says there is a strange linking error. I did something simpler: reboot the machine, clean and try again! And.... it worked. Before that, be assured that i tried several times... very strange.

Strang, but than again it is Windows :-(

> However once this hurdle was passed, I have issues with the ICU I compiled.
>
> I am unable to compile most recent 59 and 60 versions.
>
> Version 52 had issues, By trying version 55 I was able to compile base !
>
> However, when launching any app, I get a popup saying that "icuin55.dll is missing from your computer".
>
> But it successfully linked without any additional flags... hmm? What could be the trick?

That sounds like the lib file needed for linking is present but the dll using when running is missing  or corrupt.

Fred


_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Riccardo Mottola-5

Hi,


On 12/11/2017 20:15, Fred Kiefer wrote:
Version 52 had issues, By trying version 55 I was able to compile base !

However, when launching any app, I get a popup saying that "icuin55.dll is missing from your computer".

But it successfully linked without any additional flags... hmm? What could be the trick?
That sounds like the lib file needed for linking is present but the dll using when running is missing  or corrupt. 

I "fixed" the issue by copying the .dll from "lib" to "bin" and things work again. I noticed that the old 46 ICU I had had DLLs in bin.
I wonder if this is a change in ICU's build system or already back then our install was "tricked".

This means however that at least a partial update of our MSYS evironment can be planned, the tricky part will be put things together and make an installer.

Riccardo

_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev
Reply | Threaded
Open this post in threaded view
|

Re: header issue compiling Base

Ivan Vučica-2
Was the binary you were trying to start in "bin"?

DLL search path on Windows:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx (see Standard Search Order for Desktop Applications section)

Just leaving it in "lib" won't let the app find it unless "lib" is in %PATH%.

I am not aware of a search path being embeddable into the .exe like on other platforms; safest bet is to ship the DLL right next to the executable. We might be able to hack something together for Vista+ systems and SetDefaultDllDirectories(), but it's probably not worth it.

On Sun, Nov 19, 2017 at 1:10 PM Riccardo Mottola <[hidden email]> wrote:

Hi,


On 12/11/2017 20:15, Fred Kiefer wrote:
Version 52 had issues, By trying version 55 I was able to compile base !

However, when launching any app, I get a popup saying that "icuin55.dll is missing from your computer".

But it successfully linked without any additional flags... hmm? What could be the trick?
That sounds like the lib file needed for linking is present but the dll using when running is missing  or corrupt. 

I "fixed" the issue by copying the .dll from "lib" to "bin" and things work again. I noticed that the old 46 ICU I had had DLLs in bin.
I wonder if this is a change in ICU's build system or already back then our install was "tricked".

This means however that at least a partial update of our MSYS evironment can be planned, the tricky part will be put things together and make an installer.


Riccardo
_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

_______________________________________________
Gnustep-dev mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/gnustep-dev