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

Updated version of mongo-c-driver in doc #4421

Closed
wants to merge 1 commit into from

Conversation

Anjali-NEC
Copy link
Contributor

Updated version from 1.23.1 to 1.24.3 of mongo-c-driver in document

@fgalan
Copy link
Member

fgalan commented Sep 8, 2023

As far as I understand, this PR is modifying the "Ubuntu 20.04 LTS" sections in the documentation and the modification of this sections would be done by @fisuda (see #4417 (comment)).

If this PR helps @fisuda to complete his work, then we can merge. Otherwise, I'd suggest to wait to his contribution.

@fisuda what do you think, please?

@fisuda
Copy link
Contributor

fisuda commented Sep 8, 2023

I'm tring to build Orion with mongo-c-driver 1.24.3 on Ubuntu 20.04. The mongo-c-driver 1.24.3 build succeeds, but the Orion (head) build fails.

Orion build error:

[ 17%] Linking CXX static library libpa.a
/opt/fiware-orion/src/lib/serviceRoutines/versionTreat.cpp: In function 'std::string libVersions()':
/opt/fiware-orion/src/lib/serviceRoutines/versionTreat.cpp:95:29: error: 'OPENSSL_FULL_VERSION_STR' was not declared in this scope
   95 |   total += ssl     + "\"" + OPENSSL_FULL_VERSION_STR  "\"" + ",\n";
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
make[3]: Leaving directory '/opt/fiware-orion/BUILD_RELEASE'

The log is here: https://github.com/fisuda/report/tree/master/orion/20230908_mongo-c-driver-1.24.3_ubuntu20.04

mongo build log: L3268-L9291 in build.log file

@fisuda
Copy link
Contributor

fisuda commented Sep 10, 2023

@Anjali-NEC If you want to change the document, you should provide evidence that it is correct.

@fgalan
Copy link
Member

fgalan commented Sep 11, 2023

I'm tring to build Orion with mongo-c-driver 1.24.3 on Ubuntu 20.04. The mongo-c-driver 1.24.3 build succeeds, but the Orion (head) build fails.

Orion build error:

[ 17%] Linking CXX static library libpa.a
/opt/fiware-orion/src/lib/serviceRoutines/versionTreat.cpp: In function 'std::string libVersions()':
/opt/fiware-orion/src/lib/serviceRoutines/versionTreat.cpp:95:29: error: 'OPENSSL_FULL_VERSION_STR' was not declared in this scope
   95 |   total += ssl     + "\"" + OPENSSL_FULL_VERSION_STR  "\"" + ",\n";
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
make[3]: Leaving directory '/opt/fiware-orion/BUILD_RELEASE'

The log is here: https://github.com/fisuda/report/tree/master/orion/20230908_mongo-c-driver-1.24.3_ubuntu20.04

mongo build log: L3268-L9291 in build.log file

One of the changes introduced in PR #4417 was this one in src/lib/serviceRoutines/versionTreat.cpp:

#ifdef OLD_SSL_VERSION_FORMAT
  // Needed by openssl 1.1.1n in Debian 11 and before
  total += ssl     + "\"" + SHLIB_VERSION_NUMBER  "\"" + ",\n";
#else
  total += ssl     + "\"" + OPENSSL_FULL_VERSION_STR  "\"" + ",\n";
#endif

I understand that Ubuntu 20.04 is wrongly using the #else branch. I undrestand that Ubuntu 20.04 is still using openssl 1.1 (which uses SHLIB_VERSION_NUMBER) instead of openssl 3.0 (which uses OPENSSL_FULL_VERSION_STR )

The OLD_SSL_VERSION_FORMAT declaration is set in this part of the CMakeLists.txt file:

# Enables some some #ifdef in the code for compiling in old system
# FIXME: cleanup OLD_SSL_VERSION_FORMAT stuff after consolidating the change to Debian 12+
IF(${DISTRO} MATCHES "Debian_11.*")
  ADD_DEFINITIONS(-DOLD_SSL_VERSION_FORMAT)
ENDIF()

where DISTRO comes from:

execute_process(COMMAND            sh ../scripts/build/osDistro.sh
                OUTPUT_VARIABLE    DISTRO)

The DISTRO value can be seen also in the compilation log, at the begiging, like this:

contextBroker distro: 'Debian_12.1'

So probably the IF condition needs to be expanded to include Ubutun 20.04. Something like this (not tested):

IF((${DISTRO} MATCHES "Debian_11.*" ) OR (${DISTRO} MATCHES "Ubuntu_20.04"))

However, given that the Ubuntu 20.04 procedure is going to be removed (see PR #4423) no further change needs to be done related with this.

@fgalan
Copy link
Member

fgalan commented Sep 11, 2023

@Anjali-NEC If you want to change the document, you should provide evidence that it is correct.

I fully agree.

Moreover, if Ubuntu 20.04 section is going to be removed (see PR #4423) this PR should be closed, as the text it amends will disappear.

@Anjali-NEC
Copy link
Contributor Author

Anjali-NEC commented Sep 26, 2023

@Anjali-NEC If you want to change the document, you should provide evidence that it is correct.

I fully agree.

Moreover, if Ubuntu 20.04 section is going to be removed (see PR #4423) this PR should be closed, as the text it amends will disappear.

Closed PR #4421

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

Successfully merging this pull request may close these issues.

3 participants