UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Custom builder for a library

    Scheduled Pinned Locked Moved App Development
    6 Posts 3 Posters 1.0k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      PerlMax
      last edited by

      Hello everybody,

      has someone an example for a custom builder for a library? I tried to create an Test-App with my perl Efl binding (pELF) :beaming_face_with_smiling_eyes: (at the moment it is just an experiment whether it would be possible to write apps with enlightenment foundation libraries...)

      This is my clickable file as far:

      clickable_minimum_required: 8.0.0
      builder: pure-qml-cmake
      kill: qmlscene
      dependencies_target: 
          - "libefl-all-dev"
      libraries:
         pEFL:
             builder: custom
             build:
               - "perl ./Makefile.PL"
               - "make"
               - "make install"
      

      with clickable build --libs I get the following error:

      Can't open perl script "./Makefile.PL": No such file or directory
      Command exited with non-zero exit status 2, see above for details. This is most likely not a problem with Clickable.
      

      cd'ing into ./libs/pEFL (where I have the source of the perl module) doesn't work, too:

      bash: line 3: cd: ./libs/pEFL: No such file or directory
      Command exited with non-zero exit status 1, see above for details. This is most likely not a problem with Clickable.
      

      Thanks in advance for any help :love-you_gesture:
      Max

      1 Reply Last reply Reply Quote 0
      • P Offline
        PerlMax
        last edited by

        Okay, I could build the module with a custom perl script. Now I have the perl module files under build/all/pEFL/install or so.

        How do I get these files into the click package? And what path will these file have when installed?

        Thanks,
        Max

        1 Reply Last reply Reply Quote 0
        • P Offline
          PerlMax
          last edited by PerlMax

          Good morning, i could compile the app for amd64 architecture 🤗 but cross compiling didn't work:

          /usr/bin/ld: skipping incompatible /usr/lib/aarch64-linux-gnu/libm.a when searching for -lm
          collect2: error: ld returned 1 exit status
          make: *** [Makefile:4178: blib/arch/auto/pEFL/pEFL.so] Error 1
          

          Has someone a clue what's the problem here? Ist arm64 the same as aarch64?

          And for armfh I get the following error:

          In file included from /usr/include/features.h:485,
                           from /usr/include/arm-linux-gnueabihf/sys/types.h:25,
                           from /usr/lib/x86_64-linux-gnu/perl/5.30/CORE/perl.h:697,
                           from lib/pEFL.xs:3:
          /usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
              7 | # include <gnu/stubs-soft.h>
                |           ^~~~~~~~~~~~~~~~~~
          compilation terminated.
          make: *** [Makefile:1057: lib/pEFL.o] Error 1
          

          Thanks in advance,
          Max

          lduboeufL 1 Reply Last reply Reply Quote 0
          • lduboeufL Offline
            lduboeuf @PerlMax
            last edited by

            @PerlMax
            Maybe you will have better luck on the App dev Telegram channel https://t.me/UbuntuAppDevEN

            and sharing your project's repo will help

            1 Reply Last reply Reply Quote 0
            • P Offline
              PerlMax
              last edited by

              I could built the lib, but starting doesn't work:

              Launching app
              terminate called after throwing an instance of 'std::runtime_error'
                what():  Lost our connection with the registry
              -bash: line 1: 151018 Aborted                 lomiri-app-launch hellopefl.maxperl_hellopefl_1.0.0
              Started: hellopefl.maxperl_hellopefl_1.0.0
              ADB_COMMAND_FAILED
              

              How can I start a app from the terminal, so that I can see error messages?

              Thanks for the hint for the dev group, I will look into it the next days...

              Best wishes
              Max

              dobeyD 1 Reply Last reply Reply Quote 0
              • dobeyD Offline
                dobey @PerlMax
                last edited by

                @PerlMax said in Custom builder for a library:

                How can I start a app from the terminal, so that I can see error messages?

                Running clickable logs should let you see the log messages for your app, if there are any. However, given what you've posted already, it seems you are running a bash script, which runs some other process, which has hit a SIGABRT condition.

                Perl is not really a supported language for building UT applications, so we'd need to see your code (preferably in a git repository) to be able to help much further. Whatever you are running on the first line of your script is failing. If it is perl, then you might want to also check the system log on your device (/var/log/syslog) for possible apparmor DENIALs.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post