Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libjffi.so for linux riscv64 is not included in version 1.3.13 #161

Open
Glavo opened this issue Jan 19, 2025 · 11 comments
Open

libjffi.so for linux riscv64 is not included in version 1.3.13 #161

Glavo opened this issue Jan 19, 2025 · 11 comments
Milestone

Comments

@Glavo
Copy link

Glavo commented Jan 19, 2025

No description provided.

@headius
Copy link
Member

headius commented Jan 21, 2025

Hmm I'll look into it.

@headius headius added this to the 1.3.14 milestone Jan 21, 2025
@headius
Copy link
Member

headius commented Jan 21, 2025

Support was added in #136 but a binary was never added. I'll get that built and released.

@headius
Copy link
Member

headius commented Jan 21, 2025

@jcharaoui I attempted to build the riscv64 binary on one of the GCC build farm servers and it gave me an error during config:

-build-native-library:
     [exec] Configuring libffi for riscv64-linux
     [exec] configure: error: in `/home/headius/jffi/build/jni/libffi-riscv64-linux':
     [exec] configure: error: cannot run C compiled programs.
     [exec] If you meant to cross compile, use `--host'.
     [exec] See `config.log' for more details
     [exec] make: *** [/home/headius/jffi/jni/GNUmakefile:323: /home/headius/jffi/build/jni/libffi-riscv64-linux/.libs/libffi_convenience.a] Error 1

Are you able to run ant jar to build this binary on your riscv64 environment?

@jcharaoui
Copy link
Contributor

I don't have a riscv64 environment, but Debian's build servers are able to build the package: https://buildd.debian.org/status/fetch.php?pkg=jffi&arch=riscv64&ver=1.3.13%2Bds-1%2Bb1&stamp=1730402630&raw=0

Note that we carry some patches on top of the upstream source and the build process is not a simple ant jar.

@headius
Copy link
Member

headius commented Jan 21, 2025

@jcharaoui I know we've made some efforts to incorporate those changes back into jffi. Is there any way we can safely reduce that diff?

I'll look those over and see if I can get a build working myself for now.

@jcharaoui
Copy link
Contributor

Of course, I'd be happy to reduce the diff! However I'm not in the best position to evaluate the relevance of upstreaming some of these patches which were authored a long time ago by other Debian maintainers. I can mention however that patches tagged with Forwarded: not-needed are already known as unlikely candidates for upstream.

@headius
Copy link
Member

headius commented Jan 21, 2025

Most of these patches seem pretty benign and simple changes to the build process. @jcharaoui Would you have time to assemble these into a PR (or multiple PRs if you prefer)?

The only one that seems like it needs a more targeted change:

  • junit_path_for_tests.patch (should source from Maven for normal builds)

Of course, getting the whole ant script into the Maven build would be even better.

@jcharaoui
Copy link
Contributor

I can assemble them into one or more PRs, whatever you prefer.

@headius
Copy link
Member

headius commented Jan 21, 2025

@jcharaoui I think one PR noting all of the individual patches would be good enough. Skip the junit_path_for_tests.patch since that is specific to the Debian environment.

@headius
Copy link
Member

headius commented Jan 21, 2025

FWIW I don't know that any of these will fix my issue building riscv64 binaries.

@Glavo You reported this... I assume you have a riscv64 environment you can work with? Perhaps you could help me figure out why it doesn't build?

@Glavo
Copy link
Author

Glavo commented Jan 22, 2025

I ran ant jar && ant archive-platform-jar && mvn package in the following environment and the build succeeded:

glavo@revyos-lpi4a ~> fastfetch
       _,met$$$$$gg.           glavo@revyos-lpi4a
    ,g$$$$$$$$$$$$$$$P.        ------------------
  ,g$$P"         """Y$$.".     OS: Debian GNU/Linux trixie trixie/sid riscv64
 ,$$P'               `$$$.     Host: Sipeed Lichee Pi 4A 16G
',$$P       ,ggs.     `$$b:    Kernel: Linux 6.6.66-th1520
`d$$'     ,$P"'   .    $$$     Uptime: 16 mins
 $$P      d$'     ,    $$$P    Packages: 1921 (dpkg)
 $$:      $.   -    ,d$$'      Shell: fish 3.6.0
 $$;      Y$b._   _,d$P'       Theme: Breeze [GTK2/3]
 Y$$.    `.`"Y$$$$P"'          Icons: breeze [GTK2/3/4]
 `$$b      "-.__               Font: Noto Sans (10pt) [GTK2/3/4]
  `Y$$                         Cursor: breeze (24px)
   `Y$$.                       Terminal: /dev/pts/1
     `$$b.                     CPU: thead,c910 rv64gc (4) @ 1.85 GHz
       `Y$$b.                  GPU: Img gpu [Integrated]
          `"Y$b._              Memory: 616.50 MiB / 15.44 GiB (4%)
             `"""              Swap: 0 B / 4.00 GiB (0%)
                               Disk (/): 15.51 GiB / 110.13 GiB (14%) - ext4
                               Local IP (end0): 192.168.31.68/24
                               Locale: en_US.UTF-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants