Re: ***JUNK MAIL*** FW: libobjc compile issue on mingw

2014-01-01 Thread David Chisnall
On 1 Jan 2014, at 03:04, Did anyone figure this out??? 
gccdragoonk...@yahoo.com wrote:

 Is there a binary of libobjc2 in existence for windows??

No.  Until a few weeks ago, I had no Windows machine to test it on, and had had 
no replies to any of my requests for assistance in testing / debugging from 
people who cared about Windows.  As such, libobjc2 is untested and unsupported 
on Windows.  I do now have a Windows VM, so it will probably get done at some 
point, but it's not very high up my priority list, as I haven't used Windows on 
a daily basis for about a decade.

David

-- Sent from my Apple II


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: ***JUNK MAIL*** FW: libobjc compile issue on mingw

2013-08-18 Thread Adam Fedor
I finally had some time to work on this and have got (perhaps) a little farther 
(I compiled with clang, although I get similar errors with gcc).  I still these 
errors:

h:/Source/nsis/sources/gstep-current/svn-libobjc2/block_trampolines.S:113: 
Error: junk at end of line, first unrecognized character is `-'

Which I can solve by deleting these lines in block_trampolines.S and 
objc_msgSend.S:

Index: block_trampolines.S
===
--- block_trampolines.S (revision 36982)
+++ block_trampolines.S (working copy)
@@ -110,5 +110,4 @@
 CDECL(__objc_block_trampoline_end_sret):
 #endif
 #if HAS_SECTION_DIRECTIVE
-.section .note.GNU-stack,,%progbits
 #endif

Which didn't seem to cause any side effects, but then I ran into the errors 
Jerry had below. Based on some googling, I tried to fix the this error by 
removing -fPIC and defining -DDLL_EXPORT, but that didn't seem to help. 
Finally I just removed this line (sorry, I don't know any assembly):

Index: objc_msgSend.x86-32.S
===
--- objc_msgSend.x86-32.S   (revision 36982)
+++ objc_msgSend.x86-32.S   (working copy)
@@ -80,7 +80,6 @@
 7:
popl  %ebx;
 8:
-   addl  $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx
leal  SmallObjectClasses@GOTOFF(%ebx), %eax
mov   (%eax), %eax
popl  %ebx

and the file compiled, but I got an error message later when linking (which 
appears related):

CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x72): undefined reference 
to `slowMsgLookup@PLT'
CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x84): undefined reference 
to `SmallObjectClasses@GOTOFF'
CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x101): undefined reference 
to `slowMsgLookup@PLT'
CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x113): undefined reference 
to `SmallObjectClasses@GOTOFF'
CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x190): undefined reference 
to `slowMsgLookup@PLT'
CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x1a2): undefined reference 
to `SmallObjectClasses@GOTOFF'

I'm still trying to find something that works for that.  Also, FYI asprintf and 
mkstemp are not defined on MingW, but it's trivial to add a definition for 
those (patch attached, although probably in the wrong place).

Adam


mingw.patch
Description: Binary data




On Jul 10, 2013, at 7:48 AM, Jerry White je...@white.gets-it.net wrote:

 David, this is Jerry White again. I am writing you from my personal email 
 because I am having to do this testing away from the office.
 
 I deleted my previous download of libobjc2 and obtained the trunk, as you 
 suggested. The compilation appears to get a little further now in that we get 
 past block_trampolines.S. Now we appear to get stuck on objc_msgSend.S (as 
 you guessed would happen). I am including the pertinent output below.
 
 Assembling block_trampolines.S...
 Assembling objc_msgSend.S...
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S: Assembler messages:
 ./objc_msgSend.x86-32.S:98: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S:102: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S:106: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 clang.exe: error: assembler (via gcc) command failed with exit code 1 (use -v 
 to see invocation)
 make: *** [objc_msgSend.o] Error 1



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: ***JUNK MAIL*** FW: libobjc compile issue on mingw

2013-08-18 Thread David Chisnall

On 18 Aug 2013, at 18:25, Adam Fedor fe...@gnu.org wrote:

 I finally had some time to work on this and have got (perhaps) a little 
 farther (I compiled with clang, although I get similar errors with gcc).  I 
 still these errors:
 
 h:/Source/nsis/sources/gstep-current/svn-libobjc2/block_trampolines.S:113: 
 Error: junk at end of line, first unrecognized character is `-'
 
 Which I can solve by deleting these lines in block_trampolines.S and 
 objc_msgSend.S:
 
 Index: block_trampolines.S
 ===
 --- block_trampolines.S   (revision 36982)
 +++ block_trampolines.S   (working copy)
 @@ -110,5 +110,4 @@
 CDECL(__objc_block_trampoline_end_sret):
 #endif
 #if HAS_SECTION_DIRECTIVE
 -.section .note.GNU-stack,,%progbits
 #endif
 
 Which didn't seem to cause any side effects, but then I ran into the errors 
 Jerry had below. Based on some googling, I tried to fix the this error by 
 removing -fPIC and defining -DDLL_EXPORT, but that didn't seem to help. 
 Finally I just removed this line (sorry, I don't know any assembly):

The correct fix is probably to ensure that HAS_SECTION_DIRECTIVE is not defined 
on win32 (or just change it to #ifdef __ELF__, since I think that is only 
needed on ELF platforms).

 Index: objc_msgSend.x86-32.S
 ===
 --- objc_msgSend.x86-32.S (revision 36982)
 +++ objc_msgSend.x86-32.S (working copy)
 @@ -80,7 +80,6 @@
 7:
   popl  %ebx;
 8:
 - addl  $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx
   leal  SmallObjectClasses@GOTOFF(%ebx), %eax
   mov   (%eax), %eax
   popl  %ebx
 
 and the file compiled, but I got an error message later when linking (which 
 appears related):
 
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x72): undefined reference 
 to `slowMsgLookup@PLT'
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x84): undefined reference 
 to `SmallObjectClasses@GOTOFF'
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x101): undefined 
 reference to `slowMsgLookup@PLT'
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x113): undefined 
 reference to `SmallObjectClasses@GOTOFF'
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x190): undefined 
 reference to `slowMsgLookup@PLT'
 CMakeFiles/objc.dir/objc_msgSend.S.obj:fake:(.text+0x1a2): undefined 
 reference to `SmallObjectClasses@GOTOFF'
 
 I'm still trying to find something that works for that.  Also, FYI asprintf 
 and mkstemp are not defined on MingW, but it's trivial to add a definition 
 for those (patch attached, although probably in the wrong place).

I believe that for win32, you should be able to replace this entire sequence 
with a direct reference to SmallObjectClasses, as DLLs on Win32 are not 
position-independent code (the sequence from the call 7f to the leal are just 
finding the address of SmallObjectClasses).  

I believe that Mathieu had some patches to fix the memory allocation in 
block_to_imp.c correctly.  

David


 
 Adam
 mingw.patch
 
 
 
 On Jul 10, 2013, at 7:48 AM, Jerry White je...@white.gets-it.net wrote:
 
 David, this is Jerry White again. I am writing you from my personal email 
 because I am having to do this testing away from the office.
 
 I deleted my previous download of libobjc2 and obtained the trunk, as you 
 suggested. The compilation appears to get a little further now in that we 
 get past block_trampolines.S. Now we appear to get stuck on objc_msgSend.S 
 (as you guessed would happen). I am including the pertinent output below.
 
 Assembling block_trampolines.S...
 Assembling objc_msgSend.S...
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S: Assembler messages:
 ./objc_msgSend.x86-32.S:98: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S:102: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
 (GNU Binutils) 2.21.53.2
 0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
 ./objc_msgSend.x86-32.S:106: Error: cannot represent relocation type 
 BFD_RELOC_386_GOTPC
 clang.exe: error: assembler (via gcc) command failed with exit code 1 (use 
 -v to see invocation)
 make: *** [objc_msgSend.o] Error 1
 
 ___
 Gnustep-dev mailing list
 Gnustep-dev@gnu.org
 https://lists.gnu.org/mailman/listinfo/gnustep-dev


___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev


Re: ***JUNK MAIL*** FW: libobjc compile issue on mingw

2013-07-11 Thread Jerry White
David, this is Jerry White again. I am writing you from my personal email 
because I am having to do this testing away from the office.

I deleted my previous download of libobjc2 and obtained the trunk, as you 
suggested. The compilation appears to get a little further now in that we get 
past block_trampolines.S. Now we appear to get stuck on objc_msgSend.S (as you 
guessed would happen). I am including the pertinent output below.

Assembling block_trampolines.S...
Assembling objc_msgSend.S...
c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
(GNU Binutils) 2.21.53.2
0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
./objc_msgSend.x86-32.S: Assembler messages:
./objc_msgSend.x86-32.S:98: Error: cannot represent relocation type 
BFD_RELOC_386_GOTPC
c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
(GNU Binutils) 2.21.53.2
0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
./objc_msgSend.x86-32.S:102: Error: cannot represent relocation type 
BFD_RELOC_386_GOTPC
c:/gnustep/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/as.exe: BFD 
(GNU Binutils) 2.21.53.2
0110804 assertion fail ../../binutils-2.21.53/bfd/coff-i386.c:584
./objc_msgSend.x86-32.S:106: Error: cannot represent relocation type 
BFD_RELOC_386_GOTPC
clang.exe: error: assembler (via gcc) command failed with exit code 1 (use -v 
to see invocation)
make: *** [objc_msgSend.o] Error 1

Please let me know if I can perform any additional testing and I very much 
appreciate your attention to this issue. We are trying to use a custom-written 
application on many platforms, particularly Windows.

Jerry White
je...@white.gets-it.net
If you want to call me click here:
https://me.vonage.com/white8052 

On Jul 10, 2013, at 3:54 PM, White, Jerry P jerry.wh...@aramco.com wrote:

 
 
 -Original Message-
 From: David Chisnall [mailto:thera...@sucs.org] 
 Sent: Tuesday, July 09, 2013 6:59 PM
 To: White, Jerry P
 Cc: gnustep-dev@gnu.org
 Subject: Re: libobjc compile issue on mingw
 
 Hi Jerry,
 
 So far, my requests for someone with a Windows machine to test this code have 
 been met with silence, so thank you for at least trying to build it...
 
 The .type attribute is specific to ELF, and so is likely not required on 
 Windows.  Eric recently committed a change to trunk that disables it on Mac 
 OS X, and I've now tweaked it so that it will (hopefully) build on Windows.
 
 Note that Windows uses different calling conventions to... everything else, 
 so objc_msgSend is broken.  I think the block trampolines should work because 
 I think that the first two argument registers are the same on Windows as 
 elsewhere, but I'm not 100% sure about that without checking the 
 documentation.  
 
 The runtime is probably missing dllexport declarations from objc_msgSend as 
 well, so hopefully that isn't a problem.
 
 Please try with trunk, and let me know what problems you encounter.  Thank 
 you again for testing.
 
 David
 
 On 9 Jul 2013, at 07:23, White, Jerry P jerry.wh...@aramco.com wrote:
 
 I am using the mingw environment with clang installed. I downloaded libobjc2 
 by executing:
 svn co http://svn.gna.org/svn/gnustep/libs/libobjc2/releases/1.7/ 
 libobjc2 At this point I am getting stuck on block_trampolines.S. I have 
 read everything I can find on the web and do not see a solution. If I 
 understand properly, this file is used for assembly code, which is well 
 beyond my skill set.
 
 Any suggestions you have would be appreciated. Is there a way just to 
 download libobjc2.dll.a directly?
 
 Here are the steps I followed once I obtained the libobjc2 svn distribution.
 1.  I ran gnustep make (not cmake because I don't have it) by executing: 
  make CC=clang CXX=clang++
 2.  I saw that I was missing mman.h under mingw, so I obtained a 
 workaround by:
 o   svn co http://man-win32.googlecode.com/svn/trunk mman-win32-read-only
 o   cd mman-win32-read-only
 o   make  make install
 3.  I then went back to libobjc2 to continue working on compiling it
 o   cd ../libobjc2
 o   make CC=clang CXX=clang++
 o   compilation went ok until I encountered block_trampolines.S
 §  block_trampolines.S:26: Warning: .type pseudo-op used outside of 
 .def/.endef ignored.
 §  block_trampolines.S:26: Error: junk at end of line. First unrecognized 
 character is '_'
 §  similar messages appear on lines 29 and 110
 
 Jerry White
 Petroleum Consultant
 Event Solution
 Reservoir Simulation Division
 Reservoir Description and Simulation Department
 
 Office 966-3-873-0195
 
 
 
 The contents of this email, including all related responses, files and 
 attachments transmitted with it (collectively referred to as this Email), 
 are intended solely for the use of the individual/entity to whom/which they 
 are addressed, and may contain confidential and/or legally privileged 
 information. This Email may not be disclosed or forwarded to anyone else 
 without authorization from the