commit 945094d8f5e3aedc50503a6b29bfe9f417a15cc92c7d749f41842cb9eeaefa94 Author: Matthias Mailänder Date: Fri Dec 7 08:02:53 2012 +0000 Accepting request 144428 from home:jengelh:branches:science OBS-URL: https://build.opensuse.org/request/show/144428 OBS-URL: https://build.opensuse.org/package/show/science/4ti2?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/4ti2-1.3.2.tar.xz b/4ti2-1.3.2.tar.xz new file mode 100644 index 0000000..595ca78 --- /dev/null +++ b/4ti2-1.3.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bbe07f04cd4e9404867ceaf842518d1f978dcbee8841590dfb8f82cde23cd65 +size 2002404 diff --git a/4ti2-doc.tar.xz b/4ti2-doc.tar.xz new file mode 100644 index 0000000..1185703 --- /dev/null +++ b/4ti2-doc.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62b4cab56ab3a5d4555732847fb9fa547a04f66422576fee6453079b960691e7 +size 343396 diff --git a/4ti2-gcc.diff b/4ti2-gcc.diff new file mode 100644 index 0000000..bcd6441 --- /dev/null +++ b/4ti2-gcc.diff @@ -0,0 +1,356 @@ +From: Jan Engelhardt +Date: 2012-12-06 11:33:01.767857267 +0100 + +build: resolve coding errors after stricter C++ checks + +CircuitMatrixAlgorithm.tpp:155:51: error: 'next_column' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] +CircuitMatrixAlgorithm.tpp:155:51: note: declarations in dependent base '_4ti2_::CircuitImplementation<_4ti2_::ShortDenseIndexSet>' are not found by unqualified lookup +CircuitMatrixAlgorithm.tpp:155:51: note: use 'this->next_column' instead +[...] + +--- + src/groebner/CircuitMatrixAlgorithm.tpp | 28 ++++++++++++------------ + src/groebner/CircuitSupportAlgorithm.tpp | 36 +++++++++++++++---------------- + src/groebner/RayMatrixAlgorithm.tpp | 20 ++++++++--------- + src/groebner/RaySupportAlgorithm.tpp | 22 +++++++++--------- + 4 files changed, 53 insertions(+), 53 deletions(-) + +Index: 4ti2-1.3.2/src/groebner/CircuitMatrixAlgorithm.tpp +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/CircuitMatrixAlgorithm.tpp ++++ 4ti2-1.3.2/src/groebner/CircuitMatrixAlgorithm.tpp +@@ -152,23 +152,23 @@ CircuitMatrixAlgorithm::comput + ) + + // Find the next column. +- Index next_col = next_column(vs, remaining); ++ Index next_col = this->next_column(vs, remaining); + + int start = 0; int end = vs.get_number(); int middle; + // We sort the vectors into nonzeros and then zeros. +- sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle); + int nonzero_start = start, nonzero_end = middle; + //int zero_start = middle, zero_end = end; + // We sort the nonzeros into rays and circuits. +- sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle); ++ this->sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle); + int ray_start = nonzero_start, ray_end = middle; + int cir_start = middle, cir_end = nonzero_end; + // We sort the rays into positives and then negatives. +- sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle); + int pos_ray_start = ray_start, pos_ray_end = middle; + int neg_ray_start = middle, neg_ray_end = ray_end; + // We sort the circuits into positives and then negatives. +- sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle); + int pos_cir_start = cir_start, pos_cir_end = middle; + int neg_cir_start = middle, neg_cir_end = cir_end; + +@@ -185,8 +185,8 @@ CircuitMatrixAlgorithm::comput + + // Switch the positive and negative supports, so that it is as if all + // vectors have a positive entry in the next column. +- switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); +- switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); ++ this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); ++ this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); + + matrix = orig_matrix; + int remaining_row = upper_triangle(matrix, remaining, 0); +@@ -212,15 +212,15 @@ CircuitMatrixAlgorithm::comput + rays.insert(rays.end(), vs.get_number()-previous_size, false); + + // Switch back the positive and negative supports. +- switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); +- switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); ++ this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); ++ this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); + + // Update the supp vectors for the next_col. +- update_supports(supps, next_col, nonzero_start, nonzero_end); +- update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end); +- update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end); +- update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end); +- update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end); ++ this->update_supports(supps, next_col, nonzero_start, nonzero_end); ++ this->update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end); ++ this->update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end); ++ this->update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end); ++ this->update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end); + + *out << "\r"; + *out << " Left = " << std::setw(3) << num_remaining; +Index: 4ti2-1.3.2/src/groebner/CircuitSupportAlgorithm.tpp +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/CircuitSupportAlgorithm.tpp ++++ 4ti2-1.3.2/src/groebner/CircuitSupportAlgorithm.tpp +@@ -188,23 +188,23 @@ CircuitSupportAlgorithm::compu + ) + + // Find the next column. +- Index next_col = next_column(vs, remaining); ++ Index next_col = this->next_column(vs, remaining); + + int start = 0; int end = vs.get_number(); int middle; + // We sort the vectors into nonzeros and then zeros. +- sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_nonzeros(vs, start, end, rays, supps, pos_supps, neg_supps, next_col, middle); + int nonzero_start = start, nonzero_end = middle; + //int zero_start = middle, zero_end = end; + // We sort the nonzeros into rays and circuits. +- sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle); ++ this->sort_rays(vs, nonzero_start, nonzero_end, rays, supps, pos_supps, neg_supps, middle); + int ray_start = nonzero_start, ray_end = middle; + int cir_start = middle, cir_end = nonzero_end; + // We sort the rays into positives and then negatives. +- sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_positives(vs, ray_start, ray_end, supps, pos_supps, neg_supps, next_col, middle); + int pos_ray_start = ray_start, pos_ray_end = middle; + int neg_ray_start = middle, neg_ray_end = ray_end; + // We sort the circuits into positives and the negatives. +- sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle); ++ this->sort_positives(vs, cir_start, cir_end, supps, pos_supps, neg_supps, next_col, middle); + int pos_cir_start = cir_start, pos_cir_end = middle; + int neg_cir_start = middle, neg_cir_end = cir_end; + +@@ -233,8 +233,8 @@ CircuitSupportAlgorithm::compu + + // Switch the positive and negative supports, so that it is as if all + // vectors have a positive entry in the next column. +- switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); +- switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); ++ this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); ++ this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); + + //DEBUG_4ti2(*out << "Remaining row " << remaining_row << "\n";) + int previous_size = vs.get_number(); +@@ -258,19 +258,19 @@ CircuitSupportAlgorithm::compu + rays.insert(rays.end(), vs.get_number()-previous_size, false); + + // Switch back the positive and negative supports. +- switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); +- switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); ++ this->switch_supports(neg_ray_start, neg_ray_end, pos_supps, neg_supps); ++ this->switch_supports(neg_cir_start, neg_cir_end, pos_supps, neg_supps); + + // Update the supp vectors for the next_col. +- update_supports(supps, next_col, nonzero_start, nonzero_end); +- update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end); +- update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end); +- update_supports(pos_supps, col_map[next_col], neg_ray_start, neg_ray_end); +- update_supports(pos_supps, col_map[next_col], neg_cir_start, neg_cir_end); +- update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end); +- update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end); +- update_supports(neg_supps, col_map[next_col], pos_ray_start, pos_ray_end); +- update_supports(neg_supps, col_map[next_col], pos_cir_start, pos_cir_end); ++ this->update_supports(supps, next_col, nonzero_start, nonzero_end); ++ this->update_supports(pos_supps, next_col, pos_ray_start, pos_ray_end); ++ this->update_supports(pos_supps, next_col, pos_cir_start, pos_cir_end); ++ this->update_supports(pos_supps, col_map[next_col], neg_ray_start, neg_ray_end); ++ this->update_supports(pos_supps, col_map[next_col], neg_cir_start, neg_cir_end); ++ this->update_supports(neg_supps, next_col, neg_ray_start, neg_ray_end); ++ this->update_supports(neg_supps, next_col, neg_cir_start, neg_cir_end); ++ this->update_supports(neg_supps, col_map[next_col], pos_ray_start, pos_ray_end); ++ this->update_supports(neg_supps, col_map[next_col], pos_cir_start, pos_cir_end); + + *out << "\r"; + *out << " Left = " << std::setw(3) << num_remaining; +Index: 4ti2-1.3.2/src/groebner/RayMatrixAlgorithm.tpp +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/RayMatrixAlgorithm.tpp ++++ 4ti2-1.3.2/src/groebner/RayMatrixAlgorithm.tpp +@@ -161,7 +161,7 @@ RayMatrixAlgorithm::compute1( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + matrix = orig_matrix; +@@ -366,7 +366,7 @@ RayMatrixAlgorithm::compute0( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + matrix = orig_matrix; +@@ -615,7 +615,7 @@ RayMatrixAlgorithm::compute2( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, fathers, zeros, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, fathers, zeros, next_col, next_zero_count, next_positive_count, + next_negative_count); + + matrix = orig_matrix; +@@ -865,7 +865,7 @@ RayMatrixAlgorithm::compute3( + DEBUG_4ti2(unsigned long long int num_checks = 0;) + // Find the next column. + int next_positive_count, next_negative_count, next_zero_count; +- Index next_col = next_column(vs, remaining, ++ Index next_col = this->next_column(vs, remaining, + next_positive_count, + next_negative_count, + next_zero_count); +@@ -880,7 +880,7 @@ RayMatrixAlgorithm::compute3( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + DEBUG_4ti2(*out << "Rays:\n" << vs << "\n";) +@@ -944,7 +944,7 @@ RayMatrixAlgorithm::compute3( + IndexSet::set_difference(supports[r2], r1_supp, temp_diff); + if (temp_diff.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +@@ -959,7 +959,7 @@ RayMatrixAlgorithm::compute3( + IndexSet::set_difference(r1_supp, supports[r2], temp_diff); + if (temp_diff.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +@@ -984,7 +984,7 @@ RayMatrixAlgorithm::compute3( + IndexSet::set_difference(r1_supp, supports[r2], temp_diff2); + if (temp_diff2.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +@@ -996,7 +996,7 @@ RayMatrixAlgorithm::compute3( + DEBUG_4ti2(++num_checks;) + if (rank_check(matrix, temp_matrix, temp_diff, r1_rows)) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_added;) +@@ -1012,7 +1012,7 @@ RayMatrixAlgorithm::compute3( + IndexSet::set_difference(supports[r2], r1_supp, temp_diff); + if (temp_diff.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +Index: 4ti2-1.3.2/src/groebner/RaySupportAlgorithm.tpp +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/RaySupportAlgorithm.tpp ++++ 4ti2-1.3.2/src/groebner/RaySupportAlgorithm.tpp +@@ -153,7 +153,7 @@ RaySupportAlgorithm::compute0( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + // Note that the tree needs the ordering of the current vectors to be +@@ -352,7 +352,7 @@ RaySupportAlgorithm::compute1( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + // Note that the tree needs the ordering of the current vectors to be +@@ -565,7 +565,7 @@ RaySupportAlgorithm::compute2( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + // Note that the tree needs the ordering of the current vectors to be +@@ -773,7 +773,7 @@ RaySupportAlgorithm::compute3( + + // Find the next column. + int next_positive_count, next_negative_count, next_zero_count; +- Index next_col = next_column(vs, remaining, ++ Index next_col = this->next_column(vs, remaining, + next_positive_count, + next_negative_count, + next_zero_count); +@@ -788,7 +788,7 @@ RaySupportAlgorithm::compute3( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + int original_size = vs.get_number(); +@@ -852,7 +852,7 @@ RaySupportAlgorithm::compute3( + IndexSet::set_difference(supports[r2], r1_supp, temp_diff); + if (temp_diff.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_added;) +@@ -866,7 +866,7 @@ RaySupportAlgorithm::compute3( + IndexSet::set_difference(r1_supp, supports[r2], temp_diff); + if (temp_diff.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +@@ -885,7 +885,7 @@ RaySupportAlgorithm::compute3( + zero_supp.set_union(supports[index]); + if (index >= r2_index && index < r2_finish) + { +- create_new_vector(vs, supports, r1, index, next_col, ++ this->create_new_vector(vs, supports, r1, index, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_added;) +@@ -905,7 +905,7 @@ RaySupportAlgorithm::compute3( + IndexSet::set_difference(r1_supp, supports[r2], temp_diff2); + if (temp_diff2.power_of_2()) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_one_diff_added;) +@@ -918,7 +918,7 @@ RaySupportAlgorithm::compute3( + DEBUG_4ti2(++num_checks;) + if (!tree.dominated(temp_supp, r1, r2)) + { +- create_new_vector(vs, supports, r1, r2, next_col, ++ this->create_new_vector(vs, supports, r1, r2, next_col, + next_positive_count, next_negative_count, + temp, temp_supp); + DEBUG_4ti2(++num_added;) +@@ -1045,7 +1045,7 @@ RaySupportAlgorithm::compute4( + ) + + // We sort the vectors into zeros, positives, then negatives. +- sort(vs, supports, next_col, next_zero_count, next_positive_count, ++ this->sort(vs, supports, next_col, next_zero_count, next_positive_count, + next_negative_count); + + int original_size = vs.get_number(); diff --git a/4ti2-libtool.diff b/4ti2-libtool.diff new file mode 100644 index 0000000..f3803b8 --- /dev/null +++ b/4ti2-libtool.diff @@ -0,0 +1,26 @@ +From: Jan Engelhardt +Date: 2012-12-06 16:01:44.178343276 +0100 + +build: resolve failure to run libtool + +configure would not detect GLPK's presence if the libtool +call failed, and it does when --tag is not specified. +Happens in libtool < 2.4. + +--- + m4/glpk-check.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: 4ti2-1.3.2/m4/glpk-check.m4 +=================================================================== +--- 4ti2-1.3.2.orig/m4/glpk-check.m4 ++++ 4ti2-1.3.2/m4/glpk-check.m4 +@@ -27,7 +27,7 @@ BACKUP_CXXFLAGS=${CXXFLAGS} + BACKUP_LIBS=${LIBS} + BACKUP_CXX=${CXX} + +-CXX="./libtool --mode=link ${CXX}" ++CXX="./libtool --tag=CXX --mode=link ${CXX}" + + AC_MSG_CHECKING(for GLPK) + diff --git a/4ti2-missing-libs.diff b/4ti2-missing-libs.diff new file mode 100644 index 0000000..39d9370 --- /dev/null +++ b/4ti2-missing-libs.diff @@ -0,0 +1,28 @@ +From: Jan Engelhardt +Date: 2012-12-06 13:56:32.282683397 +0100 + +build: resolve link failure + +qsolve_main.cpp uses functions from gmpxx, and so must link to it. + + g++ -D__STDC_LIMIT_MACROS -DNDEBUG -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -o .libs/4ti2gmp 4ti2gmp-circuits_main.o 4ti2gmp-groebner_main.o 4ti2gmp-markov_main.o 4ti2gmp-minimize_main.o 4ti2gmp-normalform_main.o 4ti2gmp-qsolve_main.o 4ti2gmp-rays_main.o 4ti2gmp-walk_main.o 4ti2gmp-zbasis_main.o 4ti2gmp-main.o ./.libs/lib4ti2gmp.so -lglpk -Wl,--rpath -Wl,/usr/lib64 + /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: 4ti2gmp-qsolve_main.o: undefined reference to symbol '_ZlsRSoPK12__mpz_struct' + /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: note: '_ZlsRSoPK12__mpz_struct' is defined in DSO /usr/lib64/libgmpxx.so.4 so try adding it to the linker command line + /usr/lib64/libgmpxx.so.4: could not read symbols: Invalid operation +--- + src/groebner/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: 4ti2-1.3.2/src/groebner/Makefile.am +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/Makefile.am ++++ 4ti2-1.3.2/src/groebner/Makefile.am +@@ -269,7 +269,7 @@ lib4ti2int64_la_SOURCES = $(lib4ti2sourc + # Arbitrary precision flags. + # 4ti2 uses GMP (GLPL), an arbitrary precision arithmetic library. + if HAVE_GMP_WITH_CXX +-4ti2gmp_LDADD = lib4ti2gmp.la ++4ti2gmp_LDADD = lib4ti2gmp.la -lgmpxx + 4ti2gmp_CPPFLAGS = -D_4ti2_GMP_ $(GMP_CFLAGS) + 4ti2gmp_SOURCES = $(4ti2sources) + lib4ti2gmp_la_CPPFLAGS = -D_4ti2_GMP_ diff --git a/4ti2-nonvoid-return.diff b/4ti2-nonvoid-return.diff new file mode 100644 index 0000000..07a8f4c --- /dev/null +++ b/4ti2-nonvoid-return.diff @@ -0,0 +1,22 @@ +From: Jan Engelhardt +Date: 2012-12-06 15:33:29.895691589 +0100 + +build: resolve -Wreturn-type warnings + +qsolve_main.cpp: In function 'bool input_Rel(const char*, _4ti2_::BitSet&, _4ti2_::BitSet&, _4ti2_::BitSet&)': +qsolve_main.cpp:336:1: warning: control reaches end of non-void function [-Wreturn-type] + +--- + src/groebner/qsolve_main.cpp | 1 + + 1 file changed, 1 insertion(+) + +Index: 4ti2-1.3.2/src/groebner/qsolve_main.cpp +=================================================================== +--- 4ti2-1.3.2.orig/src/groebner/qsolve_main.cpp ++++ 4ti2-1.3.2/src/groebner/qsolve_main.cpp +@@ -333,4 +333,5 @@ input_Rel(const char* rel_filename, BitS + std::cerr << "INPUT ERROR: Check there are only the characters =, <, and >.\n"; + exit(1); + } ++ return 1; + } diff --git a/4ti2.spec b/4ti2.spec new file mode 100644 index 0000000..6a437b2 --- /dev/null +++ b/4ti2.spec @@ -0,0 +1,140 @@ +# +# spec file for package 4ti2 +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +Name: 4ti2 +Version: 1.3.2 +Release: 0 +Group: Productivity/Scientific/Math +Summary: Package for algebraic, geometric and combinatorial problems on linear spaces +License: GPL-2.0+ +URL: http://4ti2.de/ + +Source: %name-%version.tar.xz +Source2: %name-doc.tar.xz +Patch1: 4ti2-gcc.diff +Patch2: 4ti2-missing-libs.diff +Patch3: 4ti2-nonvoid-return.diff +Patch4: 4ti2-libtool.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: autoconf >= 2.59, automake, gcc-c++ >= 3.4, glpk-devel +BuildRequires: gmp-devel >= 4.1.4, libtool, xz + +%description +(Upstream has not provided a description.) + +%package -n lib4ti2gmp0 +Summary: GMP-using computation library for Gröber bases with 4ti2 +Group: System/Libraries + +%description -n lib4ti2gmp0 +(Upstream has not provided a description.) + +%package -n lib4ti2int32-0 +Summary: 32-bit wide integer-using computation library for Gröbner bases with 4ti2 +Group: System/Libraries + +%description -n lib4ti2int32-0 +(Upstream has not provided a description.) + +%package -n lib4ti2int64-0 +Summary: 64-bit wide integer-using computation library for Gröbner bases with 4ti2 +Group: System/Libraries + +%description -n lib4ti2int64-0 +(Upstream has not provided a description.) + +%package -n libzsolve0 +Summary: Library for solving systems of linear equations over Z for 4ti2 +Group: System/Libraries + +%description -n libzsolve0 +(Upstream has not provided a description.) + +%package devel +Summary: Development files for 4ti2 +Group: Development/Libraries/C and C++ +Requires: lib4ti2gmp0 = %version +Requires: lib4ti2int32-0 = %version, lib4ti2int64-0 = %version +Requires: libzsolve0 = %version + +%description devel +(Upstream has not provided a description for 4ti2.) + +This subpackage contains the include files and library links for +developing against 4ti2's libraries. + +%prep +%setup -qa2 +%patch -P 1 -P 2 -P 3 -P 4 -p1 + +%build +autoreconf -fi; +if [ ! -e libtool ]; then + # m4/glpk-check.m4 is funny... it requires libtool before + # libtool is created. + cp "$(which libtool)" ./; +fi; +%configure --enable-shared --disable-static --includedir="%_includedir/%name" +make %{?_smp_mflags}; + +%install +b="%buildroot"; +make install DESTDIR="$b"; +rm -f "$b/%_libdir"/*.la; +mkdir -p "$b/%_bindir" "$b/%_libexecdir/%name"; +mv "$b/%_bindir"/* "$b/%_libexecdir/%name/"; +pushd "$b/%_libexecdir/%name"; +for i in 4ti2*; do + ln -s "%_libexecdir/%name/$i" "$b/%_bindir/$i"; +done; + +%post -n lib4ti2gmp0 -p /sbin/ldconfig +%postun -n lib4ti2gmp0 -p /sbin/ldconfig +%post -n lib4ti2int32-0 -p /sbin/ldconfig +%postun -n lib4ti2int32-0 -p /sbin/ldconfig +%post -n lib4ti2int64-0 -p /sbin/ldconfig +%postun -n lib4ti2int64-0 -p /sbin/ldconfig +%post -n libzsolve0 -p /sbin/ldconfig +%postun -n libzsolve0 -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%_bindir/4ti2* +%_libexecdir/%name +%doc doc/* + +%files -n lib4ti2gmp0 +%defattr(-,root,root) +%_libdir/lib4ti2gmp.so.0* + +%files -n lib4ti2int32-0 +%defattr(-,root,root) +%_libdir/lib4ti2int32.so.0* + +%files -n lib4ti2int64-0 +%defattr(-,root,root) +%_libdir/lib4ti2int64.so.0* + +%files -n libzsolve0 +%defattr(-,root,root) +%_libdir/libzsolve.so.0* + +%files devel +%defattr(-,root,root) +%_includedir/4ti2 +%_libdir/lib*.so + +%changelog