Bug 273835 - New port: devel/objfw
Summary: New port: devel/objfw
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 23:21 UTC by Jonathan Schleifer
Modified: 2023-09-18 19:55 UTC (History)
2 users (show)

See Also:


Attachments
Patch (10.72 KB, patch)
2023-09-15 23:21 UTC, Jonathan Schleifer
no flags Details | Diff
Patch v2 (94.09 KB, patch)
2023-09-16 13:49 UTC, Jonathan Schleifer
no flags Details | Diff
devel/objfw: Portable, lightweight framework for the Objective-C language (96.13 KB, patch)
2023-09-16 17:21 UTC, Robert Clausecker
fuz: maintainer-approval? (js)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Schleifer 2023-09-15 23:21:21 UTC
Created attachment 244908 [details]
Patch
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 04:41:24 UTC
Thank you for your submission.

Please check if you can set your name and surname in bugzilla for proper attribution.  This is not mandatory though.

Would it be appropriate to have an NLS option for the localisation files?

I see that the package seems to have documentation.  Could you check if the documentation can be generated and built as a part of the package (possibly depending on the state of the DOCS option)?

Check if you can hook up the test suite to TEST_TARGET or do-test.  This makes
it easier to test the port.

Port passes a build test and looks good otherwise.
Comment 2 Jonathan Schleifer 2023-09-16 13:49:41 UTC
Created attachment 244938 [details]
Patch v2

Updated patch attached.
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 17:21:47 UTC
Created attachment 244940 [details]
devel/objfw: Portable, lightweight framework for the Objective-C language

Thank you for this update.  Please find attached the patch I plan to commit.  It has a number of small changes to make the port confirm better to our ports infrastructure and changed MAINTAINER to the new email address to set.

Please let me know if you are okay with this updated patch.
Comment 4 Jonathan Schleifer 2023-09-16 18:56:35 UTC
Please use js@nil.im for the e-mail address (both for MAINTAINER and the commit author), then LGTM :).
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 19:24:36 UTC
(In reply to Jonathan Schleifer from comment #4)

Your bugzilla address should match the maintainer address in the port so you'll get notified if bugs against your port are filed.  I can change it to what you want, but that may make things harder for you in the future.

Alternatively, you can change your bugzilla address to js@nil.im, too.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 19:32:30 UTC
On armv7 FreeBSD 13.2, "make test" fails:

cd tests && /usr/bin/make -s run
[Runtime] Calling a non-existent method via super: testing...[ObjFWRT @ class.m:568] Class E not found!
Abort trap (core dumped)
*** Error code 134

Stop.
make[2]: stopped in /wrkdirs/usr/ports/devel/objfw/work/objfw-1.0.3/tests
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/devel/objfw/work/objfw-1.0.3
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/objfw

Please check what the cause for this error is.
Comment 7 Jonathan Schleifer 2023-09-16 20:30:40 UTC
Changed in Bugzilla.

That bug looks pretty bad. I've seen similar bugs in the past to mostly be compiler or unwinder bugs on the lesser common platforms. ARMv7 makes things even more interesting, because it uses its own exception handling that is different from the Itanium EH handling everybody else uses.

Is there still GCC for ARMv7 for FreeBSD to test against that? I guess I need to get an ARMv7 machine that can run FreeBSD.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 20:37:10 UTC
(In reply to Jonathan Schleifer from comment #7)

Yeah, there are also some bugs in FreeBSD with respect to unwinding, so it may be possible that the error is down to us.

> Is there still GCC for ARMv7 for FreeBSD to test against that? I guess I need to get an ARMv7 machine that can run FreeBSD.

Here's the output when testing with gcc12 instead of the default clang:

cd tests && /usr/bin/make -s run
[Runtime] Calling a non-existent method via super: testing...[ObjFWRT @ class.m:568] Class U� not found!
Abort trap (core dumped)
*** Error code 134

Stop.
make[2]: stopped in /usr/home/ports/main.ports/devel/objfw/work/objfw-1.0.3/tests
*** Error code 1

The U� looks like the result of dereferencing a stray pointer.

I propose we just mark the port as broken on armv7 and move on with committing it.  You can always fix the issue upstream and submit an update to the port.

If you want to test, I recommend installing arm64 FreeBSD on a Raspberry Pi 4.  You can install a 32 bit userland in a jail or use Poudriere to test for armv7.  It's also possible to use QEMU, but there may be emulation bugs.
Comment 9 Jonathan Schleifer 2023-09-16 20:39:10 UTC
Marking it as broken on ARMv7 is fine with me.

Good to know that ARM64 platforms can also run ARMv7 binaries on FreeBSD. I guess the M1 is the exception, though, as that doesn't even have it in hardware AFAIK. I'll see if I can find something.
Comment 10 Jonathan Schleifer 2023-09-17 13:00:24 UTC
In the meantime, can/should it be imported with ARMv7 marked broken?
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2023-09-17 15:10:14 UTC
Yes of course.  I'm already working on it.
Comment 12 commit-hook freebsd_committer freebsd_triage 2023-09-17 15:31:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6e494f266b58d150da50f2818f7ee3a3dd1e8ad5

commit 6e494f266b58d150da50f2818f7ee3a3dd1e8ad5
Author:     Jonathan Schleifer <js@nil.im>
AuthorDate: 2023-09-16 17:17:06 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-17 15:26:47 +0000

    devel/objfw: Portable, lightweight framework for the Objective-C language

    ObjFW is a highly portable, lightweight, general purpose, open source
    Objective-C framework with full Objective-C 2.0, blocks and ARC support,
    providing not only basic classes like strings, arrays and dictionaries,
    but also providing abstractions for OS-dependant functionality like
    asynchronous sockets.

    While a lot of the core API is similar to Foundation, it breaks with
    Foundation's API on purpose in many places to embrace new features which
    Foundation can't use completely due to its backwards compatibility. One
    such example are exceptions, which are a first class citizen in ObjFW
    and not merely to inform the programmer of his wrongdoings like in
    Foundation.

    ObjFW runs on a huge list of platforms and offers the same API on all of
    them so that software written using ObjFW runs on all platforms
    supported by ObjFW without #ifdef hells or the like. It does not only
    run on almost any POSIX system that supports GCC >= 4, but it also works
    on Windows and niche platforms like the PlayStation Portable.

    WWW: https://objfw.nil.im/

    PR:             273835

 devel/Makefile              |    1 +
 devel/objfw/Makefile (new)  |   67 ++
 devel/objfw/distinfo (new)  |    3 +
 devel/objfw/pkg-descr (new) |   18 +
 devel/objfw/pkg-plist (new) | 1577 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 1666 insertions(+)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2023-09-17 15:34:53 UTC
Thank you for your contribution.
Comment 14 Jonathan Schleifer 2023-09-18 19:55:26 UTC
Thanks for reviewing and importing!