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

Docker-based build fails during compilation of relic #2

Open
Lavode opened this issue Aug 30, 2024 · 1 comment
Open

Docker-based build fails during compilation of relic #2

Lavode opened this issue Aug 30, 2024 · 1 comment

Comments

@Lavode
Copy link

Lavode commented Aug 30, 2024

The Docker-based build (i.e. build.sh) fails halfway through compiling relic, seemingly due to a multiply-defined function.

Last few lines of log output during compilation:

[ 45%] Building C object src/CMakeFiles/relic.dir/low/x64-asm-6l/relic_fp_rdc_low.s.o
[ 45%] Building C object src/CMakeFiles/relic.dir/low/x64-asm-6l/relic_fp_shift_low.s.o
[ 45%] Linking C shared library ../lib/librelic.so
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/relic.dir/low/x64-asm-6l/relic_bn_shift_low.s.o: in function `bn_rshs_low':
(.text+0x0): multiple definition of `bn_rshs_low'; CMakeFiles/relic.dir/low/x64-asm-6l/relic_bn_shift_low.c.o:relic_bn_shift_low.c:(.text+0x40): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [lib/librelic.so] Error 1
make[1]: *** [src/CMakeFiles/relic.dir/all] Error 2
make: *** [all] Error 2
Build failed for x86_64.

Local platform:

Linux snip 6.10.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 19 Aug 2024 17:02:39 +0000 x86_64 GNU/Linux

Docker version:

› docker version
Client:
 Version:           27.1.2
 API version:       1.46
 Go version:        go1.23.0
 Git commit:        d01f264bcc
 Built:             Sun Aug 18 14:43:14 2024
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          27.1.2
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.23.0
  Git commit:       f9522e5e96
  Built:            Sun Aug 18 14:43:14 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353.m
 runc:
  Version:          1.1.13
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

(This may well be an upstream issue, but given that's an active project where none reported this issue, and you seem to customize the build quite a bit, I figured I'd mention it here first.)

@Lavode
Copy link
Author

Lavode commented Aug 30, 2024

Addendum: Adjusting the build script to install an older version of relic (I chose 0.6.0, which is closer to when you last updated this project) has fixed this specific compilation issue.

Likely an incompatibility somewhere between the current version of relic, the version of dependencies (i.e. GMP?) you install, and your wrapper.

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

1 participant