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

Fail to build with --library-types=static-pic #452

Closed
timlag1305 opened this issue Dec 27, 2020 · 1 comment
Closed

Fail to build with --library-types=static-pic #452

timlag1305 opened this issue Dec 27, 2020 · 1 comment

Comments

@timlag1305
Copy link

I am building langkit on Linux using the following command:

python manage.py build-langkit-support --library-types=static-pic

I get the following linking error:

/usr/bin/ld: -r and -pie may not be used together
collect2: error: ld returned 1 exit status
gprlib: call to linker driver /usr/bin/gcc failed
gprbuild: could not build library for project langkit_support
Traceback (most recent call last):
  File "/home/tim/projects/aur/ada_language_server/src/langkit/manage.py", line 291, in <module>
    args.func(args, unknown_args)
  File "/home/tim/projects/aur/ada_language_server/src/langkit/manage.py", line 87, in wrapper
    fn(args)
  File "/home/tim/projects/aur/ada_language_server/src/langkit/manage.py", line 118, in build_langkit_support
    subprocess.check_call(base_argv + [f"-XLIBRARY_TYPE={library_type}"])
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gprbuild', '-P', '/home/tim/projects/aur/ada_language_server/src/langkit/support/langkit_support.gpr', '-p', '-j16', '-XBUILD_MODE=dev', '-XLIBRARY_TYPE=static-pic']' returned non-zero exit status 4.
==> ERROR: A failure occurred in build().
    Aborting...
@pmderodat
Copy link
Member

Hello,

This should be due to an issue in GPRbuild/GPRconfig, which we fixed in AdaCore/gprconfig_kb@4863a20
Please let us know if this still does not work with that patch, thanks!

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

2 participants