Skip to content

Commit

Permalink
Merge pull request #4394 from vgteam/path-normalize
Browse files Browse the repository at this point in the history
Fix build on Ubuntu 24.04.1 / GCC 13.2.0
  • Loading branch information
glennhickey committed Sep 11, 2024
2 parents 95bcbb4 + 3bfb4b9 commit 2220b91
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deps/kff-cpp-api
Submodule kff-cpp-api updated 3 files
+3 −1 CMakeLists.txt
+1 −0 kff_io.cpp
+1 −0 main.cpp
2 changes: 1 addition & 1 deletion deps/sublinear-Li-Stephens
9 changes: 7 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) {
vg_help(argv);
return 1;
}

auto* subcommand = vg::subcommand::Subcommand::get(argc, argv);
if (subcommand != nullptr) {
// We found a matching subcommand, so run it
Expand All @@ -85,7 +85,12 @@ int main(int argc, char *argv[]) {
return (*subcommand)(argc, argv);
} else {
// No subcommand found
string command = argv[1];
string command;
// note: doing argv[1] = string is producing totally bizarre "error: inlining failed in call to ‘always_inline’ ..."
// error when upgrading to Ubuntu 24.04.1 / GCC 13.2. Doing the base-by-base copy seems to work around it...
for (size_t i = 0; i < strlen(argv[1]); ++i) {
command += argv[1][i];
}
cerr << "error:[vg] command " << command << " not found" << endl;
vg_help(argv);
return 1;
Expand Down
6 changes: 4 additions & 2 deletions src/multipath_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1836,8 +1836,10 @@ namespace vg {
std::swap(rescued_secondaries[i], rescued_secondaries[end - 1]);
std::swap(rescued_distances[i], rescued_distances[end - 1]);
std::swap(rescued_multiplicities[i], rescued_multiplicities[end - 1]);
std::swap(duplicate[i], duplicate[end - 1]);

// nb: cant std::swap bool vectors in new c++
bool dupe_i = duplicate[i];
duplicate[i] = duplicate[end - 1];
duplicate[end - 1] = dupe_i;
end--;
}
else {
Expand Down

1 comment on commit 2220b91

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for merge to master. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17222 seconds

Please sign in to comment.