[bug] -static build for gst

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug] -static build for gst

Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/node/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  ildar.mulyukov
 Updated by:   ildar.mulyukov
 Status:       active

In Makefile.am we can see:
gst_LDFLAGS = -export-dynamic -static

The reason for -static is not clear to me. We have libgst.so and we can
link dynamically.

But upon linking dynamically, gst becomes less stable, at least when
working with FFI.

Anyone care to explain? Thanks




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
 Status:       active

I wanted to change this before rc2, but...

> But upon linking dynamically, gst becomes less stable, at
> least when working with FFI.

... can you expand on this?




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Ildar Mulyukov
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  ildar.mulyukov
 Updated by:   ildar.mulyukov
 Status:       active
 Attachment:   http://smalltalk.gnu.org/files/issues/smalltalk-dynamic-bins.patch (1.56 KB)

With previous releases (e.g. 2.95c) I could build gst till the end,
install it and launch it. With 2.95f I have ./cofigure && make failed:

./gst --no-user-files
--kernel-dir="/home/ildar/tmp/RPM/BUILD/smalltalk-2.95f/kernel" -I
"/home/ildar/tmp/RPM/BUILD/smalltalk-2.95f/gst.im" -iQ /dev/null
BlockClosure new "<0x40301398>" did not understand selector
/var/tmp/RPM/BUILD/smalltalk-2.95f/kernel/ObjMemory.st:628: Aborted
(ip 8)BlockClosure>>#ifCurtailed:
(ip 10)Delay class>>#runDelayProcess
(ip 4)[] in Delay class>>#startDelayLoop
(ip 28)[] in Process>>#onBlock:at:suspend:
(ip 10) BlockClosure>>#on:do:
(ip 14)[] in Process>>#onBlock:at:suspend:
(ip 2) BlockClosure>>#ensure:
(ip 10)[] in Process>>#onBlock:at:suspend:
(ip 14)BlockContext class>>#fromClosure:parent:
make[2]: *** [gst.im] Aborted

The only change I made is in the _simple_ patch.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
-Assigned to:  Unassigned
+Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
 Status:       active

I can reproduce it.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
-Priority:     normal
+Priority:     critical
 Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
 Status:       active

Reduced test case (from arrays.st)

SortedCollection extend [
    SortedCollection class >> bug2 [
        ^##(#(8 6 9 10) asSortedCollection)
    ]

    bug: a [
        self sortFrom: lastOrdered + 1 to: lastIndex.
        ^(lastOrdered + 1 to: lastIndex) collect: [:each | a].
    ]
]

^SortedCollection bug2 bug: 5




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     critical
 Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
-Status:       active
+Status:       fixed

Fixed with this simple patch:

--- orig/libgst/md-config.h
+++ mod/libgst/md-config.h
@@ -87,13 +87,7 @@
 # define REG_AVAILABILITY 0
 # define __DECL_REG1 __asm("%esi")
 # define __DECL_REG2 __asm("%edi")
-# if defined __APPLE__
-#  define __DECL_REG3 /* bug on Apple GCC? */
-# elif defined __PIC__ || defined __pic__
-#  define __DECL_REG3 __asm("%edx")   /* Don't conflict with GOT
pointer... */
-# else
-#  define __DECL_REG3 __asm("%ebx")   /* ...but prefer a callee-save
reg.  */
-# endif
+# define __DECL_REG3 /* no more caller-save regs if PIC is in use!  */
 #endif
 
 #if !defined(__DECL_REG1) && defined(PPC) || defined(_POWER) ||
defined(_IBMR2)

I have not yet removed the flag though.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
-Priority:     critical
+Priority:     normal
 Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
-Status:       fixed
+Status:       active

I see what you mean with "FFI is less stable".  GDBM tests fails, and on
x86-64 actually I cannot even build gst.  I think for 3.0 I'll go with
static linking.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
 Status:       active

Doh, I know what's happening.  It's enough to define NO_MALLOC_OVERRIDE
to fix it...  and a lot of code just becomes dead...




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] -static build for gst

Paolo Bonzini
In reply to this post by Ildar Mulyukov
Issue status update for
http://smalltalk.gnu.org/project/issue/131
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/131

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  bonzinip
 Reported by:  ildar.mulyukov
 Updated by:   bonzinip
-Status:       active
+Status:       fixed

fixed in 2.95g




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk