Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Buildtool : other attempt to build a ported app : the Bean.app example

5 views
Skip to first unread message

Patrick Cardona

unread,
Jul 8, 2020, 3:46:35 PM7/8/20
to Discussion list for the GNUstep programming environment
Hi All,

Unlike 'PBXbuilder -g', I did not find the way to generate Makefiles
with buildtool. It would appropriate to avoid the Bean_Prefix.pch
before starting the make process.

So, I tried this workaround :

1) I Modified : Bean_Prefix.pch like this :

pi@raspberrypi:~/Fabrique/gap/ported-apps/Util/Bean $ cat
Bean_Prefix.pch
//
// Prefix header for all source files of the 'Bean' target in the
'Bean' project//
#ifdef GNUSTEP
/* GNUstep code goes here ... */
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#else
/* OS-X Cocoa native code goes here ... */
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
#endif

2) I added the USER target domain...

pi@raspberrypi:~/Fabrique/gap/ported-apps/Util/Bean $ export
GNUSTEP_INSTALLATION_DOMAIN=USER && buildtool

(...)
* Building JHScroller.m
* Building JHDocumentController.m
=== Sources Build Phase Completed
=== Executing Frameworks Build Phase (Application)
* Linking build/Bean/Products/Bean.app/Bean
clang: warning: argument unused during compilation: '-shared-libgcc'
[-Wunused-command-line-argument]
=== Frameworks Build Phase Completed
=== Done...
=== Completed Executing Target Bean
=== Completed Building Project
** Build Succeeded

3) ANd I did the same to install...

pi@raspberrypi:~/Fabrique/gap/ported-apps/Util/Bean $ ls
build/Bean/Products/
Bean.app

pi@raspberrypi:~/Fabrique/gap/ported-apps/Util/Bean $ export
GNUSTEP_INSTALLATION_DOMAIN=USER && buildtool install
** Start operation Install
=== Installing Project
=== Applying Build Configuration Release
=== Done Applying Build Configuration for Release
=== Installing Target Bean
Abandon

Why 'abandon' : what is the error ? No more message from buildtool...

And so I did not find the way to show a help syntaxis nor a man page
to get the right way to use this tool.

Cheers,
Patrick


Gregory Casamento

unread,
Jul 8, 2020, 3:50:08 PM7/8/20
to Patrick Cardona, Discussion list for the GNUstep programming environment
Sometimes cocoa projects contain scripts which are run.  It's possible that message is coming from that.  I haven't tested "install" in a while, so I will need to take a look at it.  Bean should run, but it is going to be slow.  The author made some pretty Cocoa specific changes (changes to undocumented parts of the typesetter) which make it slow on GNUstep.

--
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
https://www.patreon.com/bePatron?u=352392 - Become a Patron
https://gf.me/u/x8m3sx - My GNUstep GoFundMe

Patrick Cardona

unread,
Jul 8, 2020, 4:36:40 PM7/8/20
to Gregory Casamento, Discussion list for the GNUstep programming environment
Hi Gregory,

On 2020-07-08 21:49:35 +0200 Gregory Casamento <greg.ca...@gmail.com> wrote:

> Sometimes cocoa projects contain scripts which are run. It's possible that
> message is coming from that. I haven't tested "install" in a while, so I
> will need to take a look at it. Bean should run, but it is going to be
> slow. The author made some pretty Cocoa specific changes (changes to
> undocumented parts of the typesetter) which make it slow on GNUstep.


As I can see, it does not run 'slowly', but fails to run...

My attempt is not to use Bean, but just to learn how to use buildtool, and I chose Bean because it was in the gap, so I thought it should be easy to make... Obviously, it is not.

Here is a debug report :

Reading symbols from Bean.app/Bean...done.
(gdb) run
Starting program: /home/pi/GNUstep/Applications/Bean.app/Bean
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
2020-07-08 22:12:26.269 Bean[2680:2680] styleoffsets ... guessing offsets
2020-07-08 22:12:26.286 Bean[2680:2680] styleoffsets ... guessing offsets
2020-07-08 22:12:26.715 Bean[2680:2680] Data passed to nib loading method is nil.
2020-07-08 22:12:26.715 Bean[2680:2680] Failed to load Nib
2020-07-08 22:12:26.729 Bean[2680:2680] Impossible de charger le fichier modèle
principal 'MainMenu'
2020-07-08 22:12:26.787 Bean[2680:2680] Data passed to nib loading method is nil.
2020-07-08 22:12:26.787 Bean[2680:2680] Failed to load Nib
2020-07-08 22:12:26.790 Bean[2680:2680] Data passed to nib loading method is nil.
2020-07-08 22:12:26.790 Bean[2680:2680] Failed to load Nib
2020-07-08 22:12:26.791 Bean[2680:2680] Failed to load MyDocument.nib
[Inferior 1 (process 2680) exited normally]

So maybe Bean is not a good example to test and understand buildtool.
Is there any other example well tested by the community I could try ?

>
>
> On Wed, Jul 8, 2020 at 3:46 PM Patrick Cardona via Discussion list for the
> GNUstep programming environment <discuss...@gnu.org> wrote:
>
(...)

Cheers,
Patrick


Gregory Casamento

unread,
Jul 9, 2020, 1:09:01 AM7/9/20
to Patrick Cardona, Discussion list for the GNUstep programming environment
No, this is a problem with buildtool.  Sometimes xcodeprojects (especially old ones) have some issues with the paths that are assigned to resources.  Apparently one of my recent changes for another project broke building for Bean.   Just FYI, current Xcode can't build Bean.

GC

Gregory Casamento

unread,
Jul 9, 2020, 1:09:18 AM7/9/20
to Patrick Cardona, Discussion list for the GNUstep programming environment

I'm working on a fix.

Gregory Casamento

unread,
Jul 9, 2020, 1:42:25 AM7/9/20
to Patrick Cardona, Discussion list for the GNUstep programming environment
Submitted a bug.  The issue is in NSFileManager... it's stopping due to a problem when copying the directory.

GC

Patrick Cardona

unread,
Jul 9, 2020, 3:31:48 AM7/9/20
to Gregory Casamento, Discussion list for the GNUstep programming environment
Hi Gregory,

Thank you for your investigation. So waiting now for the bug fix in NSFileManager. ;-)

Cheers,
Patrick

Patrick Cardona

unread,
Jul 10, 2020, 9:26:27 AM7/10/20
to Gregory Casamento, Discussion list for the GNUstep programming environment
Hi Gregory

The fix on NSFileManager is working well for me too. I am now able to make Bean with Buildtool from the gap Repo and to get the app running as well. So I can go on now to test more ported apps from MacOs.

Just a thing I noted : if you run 'make test' with the new gnustep-base, some tests are failing. It might be something RFM could look at too.

Cheers,
Patrick

On 2020-07-09 10:57:37 +0200 Gregory Casamento <greg.ca...@gmail.com> wrote:

> RFM has fixed the issue and pushed, thanks Richard. You need to update
> libs-base and update. I was able to build and, as you can see, it works.
> Bean is, as I said, slow because of a modification which was made in the
> typesetter. Almost no modification was done to the code. This version of
> bean should build on macos, but you might need to use an older version of
> Xcode.
>
> If you want to find other examples of projects used to test buildtool,
> under my id, gcasa, there are a bunch of tests which I have written to test
> various things, some of which I am still working on (such as Storyboards).
>
> GC
>
> On Thu, Jul 9, 2020 at 3:31 AM Patrick Cardona <patrick....@laposte.net>

Fred Kiefer

unread,
Jul 10, 2020, 9:59:31 AM7/10/20
to Patrick Cardona, Discussion list for the GNUstep programming environment


> Am 10.07.2020 um 15:25 schrieb Patrick Cardona via Discussion list for the GNUstep programming environment <discuss...@gnu.org>:
>
> Just a thing I noted : if you run 'make test' with the new gnustep-base, some tests are failing. It might be something RFM could look at too.


Patrick, if you have failing tests for GNUstep base you should report these. Nobody else knows which tests are failing for you nor why this is the case. We are using Travis on GitHub and there all tests for base seem to pass. Please report back the failing test and be sure to include the test.log file with the details for these test.

Fred

Fred Kiefer

unread,
Jul 10, 2020, 11:03:21 AM7/10/20
to Patrick Cardona, Discussion list for the GNUstep programming environment
Hi Patrick,

all the three test that fail for you seem to be internet related. Is it possible that form the machine where these tests are run no external network connection is possible? If this is that case please ignore the failing tests.

Fred

> Am 10.07.2020 um 16:31 schrieb Patrick Cardona <patrick....@laposte.net>:
> Here is a brief :
> (...)
> base/GSXML/basci.m:184
>
> Failed test: basic.m:184 ... empty plist is not valid
> 2020-07-10 10:54:58.406 basic[10942:10942] unable to find GNUstep DTD - 'plist-$at line: 1 column: 95 ... failed to load HTTP resource
> (...)
> base/NSException/basic:404
> We expect a single FAIL without any explanation as
> the test is terminated by an uncaught exception ...
> /usr/GNUstep/System/Tools/gnustep-tests : ligne 404 : 18483 Abandon $RUN_CMD
> Completed file: basic.m
>
> I join the log and the sum files too.


Gregory Casamento

unread,
Jul 10, 2020, 11:53:12 AM7/10/20
to Fred Kiefer, Patrick Cardona, Discussion list for the GNUstep programming environment

As mailing list moderator, I need to point out that this discussion is now about failing tests in base, not porting apps, so it should be moved to a new thread.

GC

Patrick Cardona

unread,
Jul 13, 2020, 4:00:26 AM7/13/20
to Gregory Casamento, Fred Kiefer, Discussion list for the GNUstep programming environment
Hi Gregory,

On 2020-07-10 17:52:39 +0200 Gregory Casamento
<greg.ca...@gmail.com> wrote:

> As mailing list moderator, I need to point out that this discussion
> is now
> about failing tests in base, not porting apps, so it should be moved
> to a
> new thread.
>
> GC

Sorry, it is done now.

Patrick.
0 new messages