Newbie back again...

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

Newbie back again...

Yan Le Guen
Hello all,

Me back again a bit desapointed... that's eventually explaining why so long is this post...

Here is attached:
1) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/make (version 2.7 from svn) :
./configure --enable-debug-by-default --with-layout=gnustep --enable-objc-nonfragile-abi


2) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/base (version 1.5 from svn):
./configure


3) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/base :
./make -j2

After only 3 attempts at building GNUstep from sources, I eventually notice that there're several ways to download the
"official" current GNUstep packages/modules whatever we call it: at least svn and git.
It seems also that these two spots are not really synchronized, isn't it?

I've also noticed that there're multiple "official" INSTALL/BUILD instructions files but none none seems to be able acheive its goals at least for me (the real newbie) on my Debian 8 based system (clang3.9/llvm 3.9, libobjc2 & libdispatch other required packages also being installed).

My questions are:
Is GNUstep project still alive?
Where is the "official repo" from where to get some recently updated/synchronized material to successfully build (for eventually help to debug) the GNUstep Libraries?

thanks for you help,
yan


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

GNUstep-Make_configure_Ouptput.txt (10K) Download Attachment
GNUstep-Base_configure_Ouptput.txt (28K) Download Attachment
GNUstep-Base_make_Ouptput.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie back again...

Fred Kiefer
Hi,

I surely won’t be able to fix all your problem but will try my best to understand what you are doing.
Let’s start from the end:

> My questions are:
> Is GNUstep project still alive?

Yes, GNUstep still seems to be alive. There just was a shared release of make, base, gun and back just a few days ago. You find this from the link on our homepage (I must admit I just edited the instruction for the backend, as it was correct, but the comment was out of date)

http://wwwmain.gnustep.org/resources/downloads.php?site=ftp%3A%2F%2Fftp.gnustep.org%2Fpub%2Fgnustep%2F

> Where is the "official repo" from where to get some recently updated/synchronized material to successfully build (for eventually help to debug) the GNUstep Libraries?


The "official repo“ i still and has been for many years the SVN on

http://svn.gna.org/viewcvs/gnustep/

As for installation instruction I would use this from the wiki:

http://wiki.gnustep.org/index.php/GNUstep_SVN_Installation_Guide


> I've also noticed that there're multiple "official" INSTALL/BUILD instructions files but none none seems to be able acheive its goals at least for me (the real newbie) on my Debian 8 based system (clang3.9/llvm 3.9, libobjc2 & libdispatch other required packages also being installed).

There is nothing bad about having multiple installation instructions. People prefer different tools and therefor may need different instructions. I for example, don’t use clang and could not be able to help you with that.

> After only 3 attempts at building GNUstep from sources, I eventually notice that there're several ways to download the
> "official" current GNUstep packages/modules whatever we call it: at least svn and git.
> It seems also that these two spots are not really synchronized, isn't it?

I think for a beginner it would be best not to start of with code that has been officially released. With the current source code there may always be tiny issues, but at the moment release and SVN are almost the same.
The GIT repository is in synch most of the time, but that synchronisation process may from time to time have problems. We will announce it, when we completely switch over to GIT.

Now to your actual problems:

> Am 22.04.2017 um 16:47 schrieb Yan Le Guen <[hidden email]>:
>
> Me back again a bit desapointed... that's eventually explaining why so long is this post...
>
> Here is attached:
> 1) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/make (version 2.7 from svn) :
> ./configure --enable-debug-by-default --with-layout=gnustep --enable-objc-nonfragile-abi

Did you also make and make install this package? And source the GNUstep.sh file after that? Sorry, but it is hard to guess what your did without any transcript.

> 2) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/base (version 1.5 from svn):
> ./configure

This output looks fine to me.

> 3) the output file resulting after executing the following command line after having cd $BUILD_DIR/core/base :
> ./make -j2

Now this is the bit that I really don’t understand and I can see why this is frustrating for you. Something goes wrong and there is no telling what or why.
GNUstep make is filtering off most of the output. You need to switch the display of compile messages on by calling make with the variable messages set to yes. I think this gets done with this line, but I currently cannot test it.

„make messages=yes“  

This should display the actual line that goes wrong, most likely clang trying to compile its first Objective-C file. Perhaps your system is a bit confused whether it should be using gcc or clang. But this is only guessing.

Hope this helps,
Fred



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

Re: Newbie back again...

Riccardo Mottola-5
In reply to this post by Yan Le Guen
Hi,

Yan Le Guen wrote:
> After only 3 attempts at building GNUstep from sources, I eventually
> notice that there're several ways to download the
> "official" current GNUstep packages/modules whatever we call it: at
> least svn and git.
> It seems also that these two spots are not really synchronized, isn't it?

I don't know "which" sources you accuse of being not synchronized.
Currently the source master is still SVN on GNA although we are
migrating away from it.

http://svn.gna.org/svn/gnustep/

The git repository is synchronized and checking right now, it shows a
commit 3 hours old. This tells me everything is working fine.

https://github.com/gnustep/

The official way to download sources is getting the tarballs from the
gnustep.org website. Easy. We just released, so everything is fine and
you can also get daily snapshot off the ftp server.

>
> I've also noticed that there're multiple "official" INSTALL/BUILD
> instructions files but none none seems to be able acheive its goals at
> least for me (the real newbie) on my Debian 8 based system
> (clang3.9/llvm 3.9, libobjc2 & libdispatch other required packages
> also being installed).
>
> My questions are:
> Is GNUstep project still alive?
> Where is the "official repo" from where to get some recently
> updated/synchronized material to successfully build (for eventually
> help to debug) the GNUstep Libraries?

I replied you above. A 3 hours commit and a set of release in the past
days shows we are still alive.

As a first thing, I would try just compiling with a simple configuration
of make: "./configure --with-layout=gnustep" and then working up towards
your goals if you need them.

I personally use gcc where possible and prefer the fragile ABI for easy
debugging  (rebuilding after a release is anyway a no-brainer and I see
no issues doing it), so I leave to other your specfic issue. As always,
to work your way up.

Riccardo

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

Re: Newbie back again...

Bertrand Dekoninck
In reply to this post by Fred Kiefer
Preamble : sorry for the noise on gnustep-dev mailing list. I've
reposted the messages here.

And...finally, it still doesn't work.

I thought that the problem had disappeared because I could compile and
run a sample program given on the ubuntu installation notes on the
gnustep wiki.

This is this program : guitest.m

#import <AppKit/AppKit.h> int main() { NSApplication *app; // Without
these 2 lines, seg fault may occur app = [NSApplication
sharedApplication]; NSAlert * alert = [[NSAlert alloc] init]; [alert
setMessageText:@"Hello alert"]; [alert addButtonWithTitle:@"All done"];
int result = [alert runModal]; if (result == NSAlertFirstButtonReturn) {
NSLog(@"First button pressed"); } }


This compiles and run fine it i use this command :

clang `gnustep-config --objc-flags` `gnustep-config --objc-libs`
-fobjc-runtime=gnustep -fblocks -lobjc -fobjc-arc -ldispatch
-lgnustep-base -lgnustep-gui guitest.m

But iif I use the following makefile to compile it (given in the wiki
also), running GUItest.app will segfault :

GNUmakefile :
include \$(GNUSTEP_MAKEFILES)/common.make

APP_NAME = GUITest
GUITest_OBJC_FILES = guitest.m

include \$(GNUSTEP_MAKEFILES)/application.make


  GUItest.app segfaults with this :

Program received signal SIGSEGV, Segmentation fault.

0x00007ffff63cc500 in objc_msgSend_fpret ()

Backtrace attached.

Then every compilation of a program (projectcenter, gorm etc) fails.

I'm stuck.

I've attached my installation scripts again and the backtrace to this mail.

There seems to be some problem with the compilation options in my setup.
This is way beyond my skills.

Cheers, Bertrand Dekoninck.


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

my_install_gnustep_first_stage.sh (1010 bytes) Download Attachment
my_install_gnustep_second_stage.sh (2K) Download Attachment
backtrace (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie back again...

David Chisnall
On 24 Apr 2017, at 09:57, Richard Frith-Macdonald <[hidden email]> wrote:
>
> Setting variables in make is fairly straightforward, but I think only you (and clang geeks) understand how these flags are actually supposed to work.
>
> How are you supposed to turn use of the non-fragile ABI on/off  what flags do you need to supply at compile time and what (if any) are supplied at link time for
> a. building with the non-fragile ABI and
> b. building without non-fragile ABI

Non-fragile ABI is the default with all modern runtimes.  The correct way of specifying a runtime is with -fobjc-runtime={name}-{version}.  So, for a recent GNUstep runtime, you’d pass -fobjc-runtime=gnustep-1.7.  The compiler will then enable all of the features that it knows that this version of the runtime supports.  For example, it will use objc_msgSend on architectures where the runtime supports this, but use the two-stage lookup on other platforms.

> To what extent are other features dependent on it?  eg. can you have ARC without nonfragile ABI?

No, ARC requires the non-fragile ABI.

David



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

Re: Newbie back again...

Richard Frith-Macdonald-9

> On 19 Jun 2017, at 10:10, David Chisnall <[hidden email]> wrote:
>
> On 24 Apr 2017, at 09:57, Richard Frith-Macdonald <[hidden email]> wrote:
>>
>> Setting variables in make is fairly straightforward, but I think only you (and clang geeks) understand how these flags are actually supposed to work.
>>
>> How are you supposed to turn use of the non-fragile ABI on/off  what flags do you need to supply at compile time and what (if any) are supplied at link time for
>> a. building with the non-fragile ABI and
>> b. building without non-fragile ABI
>
> Non-fragile ABI is the default with all modern runtimes.  The correct way of specifying a runtime is with -fobjc-runtime={name}-{version}.  So, for a recent GNUstep runtime, you’d pass -fobjc-runtime=gnustep-1.7.  The compiler will then enable all of the features that it knows that this version of the runtime supports.  For example, it will use objc_msgSend on architectures where the runtime supports this, but use the two-stage lookup on other platforms.

Thanks ... that sounds clear but forgive me for wasting time dopuble-checking;  We should remove support for specifying the fragile/nonfragile option from gnustep make since it doesn't work on any new systems?
I'm happy with that (while I'd dearly like to be able to inspect variables under debug without having to make explicit function calls to the runtime, I'm sure people can live with that limitation).
_______________________________________________
Discuss-gnustep mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
Reply | Threaded
Open this post in threaded view
|

Re: Newbie back again...

David Chisnall

> On 19 Jun 2017, at 11:11, Richard Frith-Macdonald <[hidden email]> wrote:
>
>
>> On 19 Jun 2017, at 10:10, David Chisnall <[hidden email]> wrote:
>>
>> On 24 Apr 2017, at 09:57, Richard Frith-Macdonald <[hidden email]> wrote:
>>>
>>> Setting variables in make is fairly straightforward, but I think only you (and clang geeks) understand how these flags are actually supposed to work.
>>>
>>> How are you supposed to turn use of the non-fragile ABI on/off  what flags do you need to supply at compile time and what (if any) are supplied at link time for
>>> a. building with the non-fragile ABI and
>>> b. building without non-fragile ABI
>>
>> Non-fragile ABI is the default with all modern runtimes.  The correct way of specifying a runtime is with -fobjc-runtime={name}-{version}.  So, for a recent GNUstep runtime, you’d pass -fobjc-runtime=gnustep-1.7.  The compiler will then enable all of the features that it knows that this version of the runtime supports.  For example, it will use objc_msgSend on architectures where the runtime supports this, but use the two-stage lookup on other platforms.
>
> Thanks ... that sounds clear but forgive me for wasting time dopuble-checking;  We should remove support for specifying the fragile/nonfragile option from gnustep make since it doesn't work on any new systems?

Yes, probably.  That’s still supported in clang as a legacy compat option, but I think it just expands to the equivalent of something like -fobjc-runtime=gnustep-1.0.

> I'm happy with that (while I'd dearly like to be able to inspect variables under debug without having to make explicit function calls to the runtime, I'm sure people can live with that limitation).

It probably isn’t too hard to teach gdb to make those calls for you, if there’s someone we can persuade to do it.  I plan on looking at LLDB at some point, now it’s working reliably on non-Apple platforms as well.  The Apple runtimes have a bunch of functions that are intended to be called by the debugger that we don’t currently implement, which perform various operations without acquiring locks (on the basis that the debugger may have hit a breakpoint with the relevant lock held).  It’s probably worth my implementing them (or equivalents).

David


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

Re: Newbie back again...

Riccardo Mottola-5
In reply to this post by Richard Frith-Macdonald-9
Hi,



On 19/06/2017 12:11, Richard Frith-Macdonald wrote:
> Thanks ... that sounds clear but forgive me for wasting time dopuble-checking;  We should remove support for specifying the fragile/nonfragile option from gnustep make since it doesn't work on any new systems?

can't we emit the correct -fobjc-runtime={name}-{version} for fragile?


Riccardo

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

Re: Newbie back again...

Matt Butch
In reply to this post by Bertrand Dekoninck




-Matt

--

Sent from my iPhone 6S Plus
> On Jun 19, 2017, at 18:43, Josh Freeman <[hidden email]> wrote:
>
>  <snip>
> * Removed 'ninja' package from install requirements (package no longer exists in 17.04 - probably wasn't the correct package anyways; 'ninja' package was a privilege-escalation detector)

Weird I thought I removed that from the script when I updated it for 17.04, because I noticed the same thing. It was copied from the 14.04 script which is why it was there.

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

Re: Newbie back again...

David Chisnall
In reply to this post by Bertrand Dekoninck
On 19 Jun 2017, at 23:43, Josh Freeman <[hidden email]> wrote:
>
>   The segmentation fault happens after Base sets the value of an NSThread ivar, because the memory location it writes to overlaps the area in memory where GUI expects to find a different ivar, due to the mismatched layouts; When GUI reads its ivar, it finds a nonzero value (garbage), and when the garbage value is sent an objc message, it crashes.

This sounds like a compiler bug.  The ivar accesses should both be using the same offset variable.  Are you sure that both are being compiled with the same ABI?  If so, would it be possible for you to compile the relevant -gui file and NSThread.m with -S (produce assembly, don’t compile) and send me the resulting output?

David


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