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

Chuffed: linking errors on Alma Linux and Fedora #9

Closed
niklasdewally opened this issue Oct 4, 2023 · 6 comments
Closed

Chuffed: linking errors on Alma Linux and Fedora #9

niklasdewally opened this issue Oct 4, 2023 · 6 comments
Labels
area::solvers/chuffed Related to chuffed_rs and the chuffed solver interface. kind::build-failure The build is broken!

Comments

@niklasdewally
Copy link
Collaborator

niklasdewally commented Oct 4, 2023

This is an issue for chuffed linking problems found in #6 .

Linking for chuffed fails on Alma 9 and Fedora 38.

I have tested these in clean Vagrant VMs provisioned as follows:

Fedora:

    dnf group install -y "Development Tools"
    dnf group install -y "C Development Tools and Libraries"
    dnf install -y cmake clang

Alma:

    dnf group install -y "Development Tools"
    dnf install -y cmake clang

Alma
  = note: /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(modelling.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(bool-view.cpp.o): relocation R_X86_64_32 against `.LC4' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(sat.cpp.o): relocation R_X86_64_32 against `.LC3' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(conflict.cpp.o): relocation R_X86_64_32 against `.LC1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(int-var.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(int-var-el.cpp.o): relocation R_X86_64_32 against `.LC3' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(int-var-sl.cpp.o): relocation R_X86_64_32S against symbol `_ZN10Propagator6wakeupEii' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(int-var-ll.cpp.o): relocation R_X86_64_32 against `.LC0' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(ldsb.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(mip.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(recalc.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(simplex.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(engine.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(options.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(flatzinc.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(directives.cpp.o): relocation R_X86_64_32 against hidden symbol `__dso_handle' can not be used when making a PIE object
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(binary.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(branching.cpp.o): relocation R_X86_64_32S against symbol `_ZTV11BranchGroup' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(init.cpp.o): relocation R_X86_64_32 against symbol `_ZSt4cerr@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(stats.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(registry.cpp.o): relocation R_X86_64_32 against `.LC0' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(subcircuit.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(mddglobals.cpp.o): relocation R_X86_64_32 against `.rodata._ZNSt6vectorIS_IjSaIjEESaIS1_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(linear-bool.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(well-founded.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(circuit.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(minimum.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(bool_arg_max.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(alldiff.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(cumulative.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(cumulativeCalendar.cpp.o): relocation R_X86_64_32 against `.LC24' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(disjunctive.cpp.o): relocation R_X86_64_32 against `.rodata._ZN13DisjunctiveBP9propagateEv.str1.8' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(regular.cpp.o): relocation R_X86_64_32 against hidden symbol `__dso_handle' can not be used when making a PIE object
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(lex.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(table.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(edit_distance.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(EdExplFinder.cpp.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(value-precede.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(tree.cpp.o): relocation R_X86_64_32S against symbol `_ZTV14TreePropagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(minimum_weight_tree.cpp.o): relocation R_X86_64_32S against symbol `_ZTV33IncrementalMinimumWTreePropagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(mst.cpp.o): relocation R_X86_64_32S against symbol `_ZTV2UFIiE' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(dtree.cpp.o): relocation R_X86_64_32S against symbol `_ZTV15DTreePropagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(dag.cpp.o): relocation R_X86_64_32S against symbol `_ZTV13DAGPropagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(bounded_path.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(MDD.cpp.o): relocation R_X86_64_32 against symbol `_ZSt4cout@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(mdd_prop.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(weighted_dfa.cpp.o): relocation R_X86_64_32 against `.rodata._ZNSt6vectorIN12EVLayerGraph8TravInfoESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(wmdd_prop.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(element.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(bool.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(linear.cpp.o): relocation R_X86_64_32S against symbol `_ZTV8BoolView' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(arithmetic.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(domain.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10Propagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(dijkstra.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(kosaraju_scc.cpp.o): relocation R_X86_64_32S against symbol `_ZTV11KosarajuSCC' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(MurmurHash3.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(graph.cpp.o): relocation R_X86_64_32S against symbol `_ZTV15GraphPropagator' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(dconnected.cpp.o): relocation R_X86_64_32S against symbol `_ZTV10FilteredLT' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(lengauer_tarjan.cpp.o): relocation R_X86_64_32S against symbol `_ZN14LengauerTarjan3DFSEv' can not be used when making a PIE object; recompile with -fPIE
          collect2: error: ld returned 1 exit status

Fedora 38
  = note: /usr/bin/ld: /home/vagrant/kieran/target/debug/deps/libchuffed_rs-d37182f69c381980.rlib(modelling.cpp.o): relocation R_X86_64_32 against symbol `sat' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status
@niklasdewally niklasdewally changed the title Chuffed: build errors on Alma Linux and Fedora Chuffed: linking errors on Alma Linux and Fedora Oct 4, 2023
@ChrisJefferson
Copy link
Contributor

Is this an issue just with the rust building, or a bug in chuffed generally?

Are you running chuffed's build system, or trying to compile and link it independently?

@niklasdewally
Copy link
Collaborator Author

niklasdewally commented Oct 4, 2023

Is this an issue just with the rust building, or a bug in chuffed generally?

Are you running chuffed's build system, or trying to compile and link it independently?

Its building the libchuffed.a file using Chuffed's Cmake, and then linking that .a file using Rust's build.rs.

@niklasdewally
Copy link
Collaborator Author

niklasdewally commented Oct 4, 2023

@Kieranoski702

@yigityazicilar
Copy link

I believe this happens when Rust is linking the library files generated by Chuffed when it is built with cmake.

@niklasdewally niklasdewally mentioned this issue Oct 4, 2023
4 tasks
@Kieranoski702
Copy link
Contributor

As @niklasdewally and @yigityazicilar have said above, chuffed builds fine on these platforms (using cmake) but the linking of libchuffed.a in rust is failing

@niklasdewally niklasdewally added kind::build-failure The build is broken! area::solvers/chuffed Related to chuffed_rs and the chuffed solver interface. labels Nov 15, 2023
@ozgurakgun
Copy link
Contributor

I think we can close this, we care about ubuntu and mac atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::solvers/chuffed Related to chuffed_rs and the chuffed solver interface. kind::build-failure The build is broken!
Projects
None yet
Development

No branches or pull requests

5 participants