Skip to content

CMakeLists.txt incorrectly assumes that any LSB release ID that's not 18.04 must be 16.04 #179

@danielhatton

Description

@danielhatton

Issue overview

In the CMakeLists.txt file in the root directory of the OpenStudioApplication source tree, lines 399-406 are an if...else construct, which tests whether the host system's LSB release ID is 18.04, and if not, assumes the LSB release ID must be 16.04. I think it's using LSB release ID as a proxy for Ubuntu version number. The current LTS release of Ubuntu has LSB release ID 20.04, so the assumption is no longer widely valid.

Current Behavior

On an Ubuntu 20.04 machine, the "ccmake" step of the OpenStudioApplication build process assumes the LSB release ID is 16.04, and downloads a tarball of pre-compiled Qt libraries suitable for Ubuntu 16.04. Once the tarball is downloaded, the build process fails with an error message about a hash mismatch for file qt_5_11_linux_shared_xenial.tar.gz. (I'm guessing the hash mismatch will happen even if the host system really is Ubuntu 16.04.)

Expected Behavior

Straightforward answer: the script should successfully detect when the LSB release ID is 20.04, and download a tarball suitable for Ubuntu 20.04 (or, if that's not possible, should exit with an error message "Sorry, building on Ubuntu 20.04 is not yet supported.").

Deeper answer: I'm a bit uncomfortable with the idea that the build-from-source process, for an application marketed as open-source, involves downloading (and presumably compiling against) off-distro pre-compiled libraries. Perhaps the real expected behaviour should be that the application compiles against the host system's native Qt libraries, or downloads (then compiles) a Qt source tarball rather than a pre-compiled Qt tarball.

Steps to Reproduce

On an Ubuntu 20.04 system, follow the build instructions at the end of https://github.com/NREL/OpenStudioApplication/blob/develop/README.md

Possible Solution

One way might be to add to the amazonaws repository a pre-compiled Qt library tarball suitable for Ubuntu 20.04. Then, between lines 401 and 402 of CMakeLists.txt, add

elseif(LSB_RELEASE_ID_SHORT MATCHES "20.04")
set(QT_ZIP_FILENAME "a_library_appropriate_for_20.04.tar.gz")
set(QT_ZIP_EXPECTED_MD5 "the_appropriate_hash")

or, if no appropriate tarball can be created

elseif(LSB_RELEASE_ID_SHORT MATCHES "20.04")
message(FATAL_ERROR "Sorry, building on Ubuntu 20.04 is not yet supported")

Details

I tried editing CMakeLists.txt so that (on the Ubuntu 20.04 system) the script would download the pre-compiled Qt library tarball considered suitable for 18.04. In this case, ccmake completes successfully, but then the "make" step fails with an error message about not being able to find libicui18n.so.60

Environment

Platform: Ubuntu 20.04
OpenStudioApplication version: 1.0.0

Context

Am trying to build and install OpenStudioApplication on Ubuntu 20.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TriageIssue needs to be assessed and labeled, further information on reported might be needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions