Menu

GNUstep on Portable Object Compiler

2022-04-20
2023-05-20
  • Tito Mari Francis Escano

    If I understand correctly, the Portable Object Compiler already has objcpak as a set of framework objects, can this be replaced with GNUstep framework instead? What will be the gotchas we have to consider when trying to do so?
    Thanks.

     

    Last edit: Tito Mari Francis Escano 2022-04-20
  • David Stes

    David Stes - 2022-05-12

    objpak is an implementation of the basic collection class library as described in Brad Cox' book on Objective-C. This implementation is relatively close to the classes as discussed there (see the file Books.txt in the src/objc-3.3.25 package) but it is not 100% the same because objpak uses Objective-C Blocks which were not available at the time the book was published and I have no intention to change anything about objpak. In fact if I'd change anything, it would rather be to fix some of the small differences between the book and Portable Object Compiler ... or perhaps to make very small changes while preserving full compatibility with the objpak class library as it is. My understanding is that you asked as well whether Portable Object Compiler works on OpenBSD 7.1. Yes, objc-3.3.25 compiles out of the box on OpenBSD 7.1 without any issues it seems. Also see the Platforms.txt in the src/objc-3.3.25 package because Portable Object Compiler has always worked on OpenBSD since OpenBSD 2.4.

     
    • Tito Mari Francis Escano

      Hi David,
      Can you please guide me on the requirements to build this from source for
      OpenBSD?
      OpenBSD makes release every 6 months and would like to help making this
      project regularly available to that platform.
      Please advise.
      Thanks.

      On Fri, May 13, 2022 at 2:18 AM David Stes stes@users.sourceforge.net
      wrote:

      objpak is an implementation of the basic collection class library as
      described in Brad Cox' book on Objective-C. This implementation is
      relatively close to the classes as discussed there (see the file Books.txt
      in the src/objc-3.3.25 package) but it is not 100% the same because objpak
      uses Objective-C Blocks which were not available at the time the book was
      published and I have no intention to change anything about objpak. In fact
      if I'd change anything, it would rather be to fix some of the small
      differences between the book and Portable Object Compiler ... or perhaps to
      make very small changes while preserving full compatibility with the objpak
      class library as it is. My understanding is that you asked as well whether
      Portable Object Compiler works on OpenBSD 7.1. Yes, objc-3.3.25 compiles
      out of the box on OpenBSD 7.1 without any issues it seems. Also see the
      Platforms.txt in the src/objc-3.3.25 package because Portable Object
      Compiler has always worked on OpenBSD since OpenBSD 2.4.


      GNUstep on Portable Object Compiler
      https://sourceforge.net/p/objc/discussion/general/thread/cb9221bc86/?limit=25#f4ff


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/objc/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • David Stes

    David Stes - 2023-05-20

    Installations instructions are at

    https://sourceforge.net/p/objc/code/ci/master/tree/Install.txt

    First build objc-bootstrap and install in some non-standard directory or non-standard location like:

    gnutar xvfz objc-3.3.38-bootstrap.tar.gz
    
    cd objc-3.3.38-bootstrap
    ./configure --prefix=/opt/objc-bootstrap
    make
    make install
    

    This installs in an unusual or non-standard place like /opt/objc-bootstrap, which is intentional. By this I mean, that the purpose is to install these files in an unusual location ...

    The real Portable Object Compiler package (objc-3.3.38) can then be built like :

    gnutar xvfz objc-3.3.38.tar.gz
    
    cd objc-3.3.38
    ./configure --prefix=/usr/local \
           OBJC=/opt/objc-bootstrap/bin/objc \
           XOBJC=/opt/objc-bootstrap/bin/objc \
           YACC='yacc -d' FLEX='flex --nounistd' \
           AR=echo FINAL_AR='ar cr'
    

    In the above the installation is the /usr/local directory so in this case you have to be careful because the prefix could also be set to /usr to really package for the operating system /usr directory.

    It depends on OpenBSD policies whether they prefer /usr/local or /usr.

    Note that in contrast to the objc-bootstrap, in any case for the objc Portable Object Compiler you'd use a standard location like /opt, /usr or /usr/local and not some unusual place like /opt/objc-bootstrap.

    Then you can run some checks with

    make check
    

    This make will test the compiler.

    The test suite is fairly limited at this point, but in the future I will add more tests.

    You can then make install the compiler if the "make check" was succesful.

    Also other software should build like the AT&T based cursel

    https://sourceforge.net/projects/cursel/

    If there are some issues, I'm sure it will not be too difficult to sort them out.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.