-
Notifications
You must be signed in to change notification settings - Fork 113
Switched to odb 2.5 from 2.4, since the version 2.4 is currently broken. #385
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
Conversation
not needed after the installation of odb.
|
Please amend the CI script for Bionic accordingly which would verify that with these modifications CodeCompass can be built. |
|
Also, we need to consider people who do not with to install anything non-package-manager driven to system-wide paths... the current script uses |
For this to fix, I needed to add Lines 43 to 53 in 22be6a6
|
|
I agree that the |
.travis.yml
Outdated
| - odb | ||
| - libodb-dev | ||
| - gcc-7 | ||
| - gcc-7-plugin-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A useful note for Travis @filbeofITK , that the CI starts with a pre-built image, a similar concept like Docker images.
The selected image is defined by the os (in our case linux), the distro (in our case xenial or bionic) and the language configuration parameter (in our case cpp for the CI).
These images have a couple of software preinstalled, as described here:
https://docs.travis-ci.com/user/languages/cpp/
It says that Xenial ships with GCC 5.4.0 and Bionic ships with GCC 7.4.0. These are typically installed in /usr/local/, but of course you can still install any APT package (to usr/), if necessary.
The minimal image is also useful to check, because the cpp image is a superset of that, so e.g. curl is part of all images, there is no need to install it explicitly:
https://docs.travis-ci.com/user/languages/minimal-and-generic/
Minimizing additional dependency installation can boost up the CI job runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
csordasmarton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some small comments and please don't forget to squash your commits before this pull request getting merged.
odb has to be build before thrift. Added the sudo configuration to the build2 toolchain. Remove the the data removal parts from the Dockerfile.
was a mistake, changing it to gcc-5.
Could you help me out a bit please? |
|
@filbeofITK GitHub's reply feature is stupid, it doesn't tag the person, please tag me to make sure I get the message! I didn't do anything else. I have build2 downloaded and checked out at ~/Work/CodeCompass/Dependencies-Source. Same with Thrift and gtest. I built (executed from ~/Work/CodeCompass/Dependencies-Source/build2, where I downloaded to and executed the Before creating the build directory for CodeCompass, I source in a script that sets the paths to the proper versions, as described in the documentation:
Created the build as follows: |
|
All my recent patches were based upon this branch: https://github.com/whisperity/CodeCompass/commits/working-master. There is only one commit, e0190b6, on top of you adding a few includes here and there in this patch, which allowed me to get master working again. |
Upgraded the script, not to leave any garbage if it fails to run properly.
|
@whisperity Guess I have managed to solve it. Here is the case:
So in 57ba7bb I modified |
|
From me it's an approve on this PR, thanks for your work @filbeofITK . Please write if you have any major concerns @whisperity , @csordasmarton and @bruntib and let's get this PR merged ASAP, so the master branch could be compiled again on Bionic. |
whisperity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few problems with the install guide that makes it not work on a reasonably fresh system. I've done the installation from scratch on an Ubuntu 18.04.4 LTS installed this morning into an emulator.
I'm attaching suggestions everywhere as I figured out what to do to make it build!
You read it right: the branch works and builds, with the suggestions (usually a missing package here and there on the system!) applied.
doc/deps.md
Outdated
| @@ -106,21 +158,13 @@ cd thrift-0.13.0 | |||
|
|
|||
| # Ant is required for having Java support in Thrift. | |||
| sudo apt-get install ant | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is for me, but simply running the build on 18.04 does not work in 2020. I'm testing the build on a brand new virtual machine installed this morning.
Even though Gradle started not to support HTTP download in 2020, Thrift 0.13 -- released 2019 Oct -- is still using an HTTP URL. The following output happens during the build, towards the end:
make[3]: Entering directory '/home/codecompass/thrift-0.13.0/lib/java'
./gradlew assemble \
-Prelease=true \
-Pthrift.version=0.13.0 \
--console=plain
> Task :copyDependencies FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':copyDependencies'.
> Could not resolve all files for configuration ':testRuntime'.
> Could not resolve org.slf4j:slf4j-api:1.7.25.
Required by:
project :
> Could not resolve org.slf4j:slf4j-api:1.7.25.
> Could not get resource 'http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom'.
> Could not GET 'http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom'. Received status code 501 from server: HTTPS Required
> Could not resolve org.apache.httpcomponents:httpclient:4.5.6.
Required by:
project :
> Could not resolve org.apache.httpcomponents:httpclient:4.5.6.
> Could not get resource 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom'.
> Could not GET 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom'. Received status code 501 from server: HTTPS Required
> Could not resolve org.apache.httpcomponents:httpcore:4.4.1.
The relevant breaking line is in lib/java/gradle.properties:
mvn.repo=http://repo1.maven.org/maven2
Swapping HTTP to HTTPS in the Gradle cfg fixes this:
| sudo apt-get install ant | |
| sudo apt-get install ant | |
| # Fix Thrift install script not using HTTPS for Java dependencies (http:// -> https://) | |
| sed 's/http:\/\//https:\/\//g' -i ./lib/java/gradle.properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check this in a Docker container on a fresh system soon.
Also, we are at this point of the guide, we don't need Ant to be installed. I don't have ant installed. The Docker environment does not install ant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My conclusion is that for CodeCompass we only need the Java generator and not the Java library, which we have also discussed through emails last November.
Without Ant the Java library won't be built and there is no HTTP->HTTPS issue with Gradle. (We could even add the --without-java flag to Thrift, actually the CI was building CodeCompass that way for quite a long time previously.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcserep Did you check this with running a server and trying out the search parser and search service? Those are our only upstream stuff that "depend on" Java, but I am not sure about their inside architecture.
@mcserep Right, thanks! I was thinking it's some weird link-level ODR yadda... Anyways, we shan't depend on the database that is not to be used by the build, so this clears it up. |
|
@mcserep Please check my suggestions above, especially about the system packages. There is a dissonance between the Travis- and the Dockerfile vs. going on the guide manually which is not user friendly. Otherwise, thank you for all the work coordinating this patch! 🏆 |
|
Thanks @whisperity for this detailed review. I have one question about the ODB versioning. Even thought ODB 2.4 works on Ubuntu 16.04 just fine I believe we should use the newer version there too, because of consistency. That's why I changed the travis build like I did at first. And that caused the inconsistency that you mentioned. |
|
@filbeofITK I'm not sure. I'd vote for not resorting to self-compile on a system where it works. Ubuntu 16.04 will have it's support terminated in less than a year... Until we do not depend on anything from ODB 2.5.0 that is not available in 2.4.0, let's not require users to do extra steps. Please can you squash the commits and tidy the patch out for merging? It has become 25 commits by now, most of which are few-liners. |
I think we can depend on the "Squash and merge" feature of GitHub. The one who merges shall select that button and everything will be squashed properly. |
Co-authored-by: Whisperity <whisperity@gmail.com>
Co-authored-by: Whisperity <whisperity@gmail.com>
Thanks for the through review of the PR and the install guide @whisperity ! I think the ODB version question on Ubuntu 16.04 is though, as both options have advantages and backwards. While it is true that uing ODB 2.5-beta eliminates any version difference issue between the 2 supported Ubuntu version, it also adds the additional complexity of compiling ODB, when it is not really necessary. If the developers behind ODB are nice guys and take semantic versioning seriously, there should be no API breaking change between ODB 2.4 and 2.5. Since package-repository installed dependencies may already diverge between Xenial and Bionic, I guess it is not so bad if the ODB version differs too. So I agree with @whisperity in this topic. |
Co-authored-by: Whisperity <whisperity@gmail.com>
Switched to odb 2.5 from 2.4, since the version 2.4 is currently broken. Co-authored-by: Bendegúz Filyó <filyo.bendeguz@hallgato.ppke.hu> Co-authored-by: Whisperity <whisperity@gmail.com> Co-authored-by: Máté Cserép <mcserep@gmail.com>


Odb 2.5 is in beta currently but, it is going live soon and it is said to be as stable as 2.4 was, before the gcc upgrades broke it.
I included some needed headers to the
plugins/cpp/model/include/model/cppentity.hand themodel/include/model/buildaction.hwhich were missing, but previously the odb headers included them, so this error stayed silent.I wrote an install script too, and made the docker image to use it.