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

Having problem building ResInsight #10578

Closed
sregales-TNO opened this issue Sep 5, 2023 · 6 comments
Closed

Having problem building ResInsight #10578

sregales-TNO opened this issue Sep 5, 2023 · 6 comments

Comments

@sregales-TNO
Copy link

sregales-TNO commented Sep 5, 2023

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy
❯ uname -a
Linux regalessn-everest-dev 5.15.0-1041-azure #48-Ubuntu SMP Tue Jun 20 20:34:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
❯ g++ --version
g++ (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
❯ gcc --version
gcc (Ubuntu 10.5.0-1ubuntu1~22.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
❯ python -V
Python 3.8.17
❯ cmake --version
cmake version 3.26.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).
❯ make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I follow the ResInsight build Ubuntu in order to use rips, but each build results in a failure when linking libcustom-opm-common.a can someone please help

[ 16%] Linking CXX static library libexpressionparser.a
[ 16%] Built target expressionparser
[ 17%] Linking CXX static library libcustom-opm-common.a
[ 17%] Built target custom-opm-common
make: *** [Makefile:156: all] Error 2

CMakeConfigureLog.zip

@kriben
Copy link
Collaborator

kriben commented Sep 6, 2023

Hi @sregales-TNO,

Which branch or tag are you trying to build?
I am able to build the dev branch using Ubuntu 22.04, but I am using the g++11.4 compiler.

Can you also share some more about the link error?

--
kb

@sregales-TNO
Copy link
Author

I tried building the following tags 2023.01.0 2023.03.0 2023.06.0
I apologize, due to repurposing the VM I have lost these files. I will try to rebuild with g++-11 and if I find myself in the same problem I will post it

@magnesj
Copy link
Member

magnesj commented Sep 12, 2023

I have updated some parts related to install of custom Qt and Python here
https://opm.github.io/ResInsight-UserDocumentation/getting-started/download-and-install/build-instructions-ubuntu/

@sregales-TNO
Copy link
Author

sregales-TNO commented Sep 14, 2023

there must be something I am missing I decided to build this into a GitHub workflow so that I can have an artifact that anyone in the team can easily reach for instead of taking an hour to build ResInsight, but even there with a clean Ubuntu 22.04 it still fails with the same Error, its a shame I can't reach the log files.

name: Test ResInsight

on:
 push:
   branches:
     - main
   tags: "*"
 pull_request:


env:
  ERT_SHOW_BACKTRACE: 1
  RESINSIGHT_VERSION: 2023.06.0
  INSTALL_DIR: local

jobs:
  build_dependencies:
    name: "build-deps_${{ matrix.os }}_py-${{ matrix.python-version }}"
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.8]
        os: [ubuntu-22.04]
    runs-on: ${{ matrix.os }}
    
    steps:
      - uses: "actions/setup-python@v4"
        with:
          python-version: "${{ matrix.python-version }}"
      - uses: "actions/cache@v3"
        id: cache-package
        with:
          key: ${{ matrix.os }}_python-${{ matrix.python-version }}_resinsight_${{ env.RESINSIGHT_VERSION }}
          path: ${{ github.workspace }}/resinsight_${{ env.RESINSIGHT_VERSION }}
      - name: Install dependencies
        if: steps.cache-package.outputs.cache-hit != 'true'
        run: |
          sudo apt update
          sudo apt -y install \
          build-essential \
          gcc-10 g++-10 \
          curl zip unzip tar \
          qtbase5-dev libqt5svg5-dev qtbase5-private-dev
          pip install -U pip
          pip install cmake aqtinstall
      - name: Install Qt
        if: steps.cache-package.outputs.cache-hit != 'true'
        run: |
          aqt install-qt linux desktop 5.15.2 -O ${{ github.workspace }}/Qt
      - name: Clone ResInsight
        if: steps.cache-package.outputs.cache-hit != 'true'
        run: |
          git clone -b v${{ env.RESINSIGHT_VERSION }} https://github.com/OPM/ResInsight.git
          cd ResInsight
          git submodule update --init
          ThirdParty/vcpkg/bootstrap-vcpkg.sh
          ThirdParty/vcpkg/vcpkg install grpc boost-filesystem boost-spirit eigen3
          pip install -r GrpcInterface/Python/requirements.txt
      - name: Build ResInsight
        if: steps.cache-package.outputs.cache-hit != 'true'
        run: |
          mkdir ${{ github.workspace }}/ResInsight/cmakebuild
          cd ${{ github.workspace }}/ResInsight/cmakebuild
          cmake \
          -DCMAKE_PREFIX_PATH=${{ github.workspace }}/Qt/5.15.2/gcc_64/lib/cmake \
          -DRESINSIGHT_ENABLE_GRPC=true \
          -DVCPKG_TARGET_TRIPLET=x64-linux \
          -DCMAKE_TOOLCHAIN_FILE=../ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake \
          -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python \
          -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/${{ env.INSTALL_DIR}} \
          ..

          make -j8
      - name: Package ResInsight
        if: steps.cache-package.outputs.cache-hit != 'true'
        run: |
          cd ${GITHUB_WORKSPACE}
          tar zcf ${{ github.workspace }}/resinsight_${{ env.RESINSIGHT_VERSION }}.tar.gz ${{ env.INSTALL_DIR}}
      - name: Archive ResInsight
        uses: actions/upload-artifact@v3
        with:
          name: resinsight_${{ env.RESINSIGHT_VERSION }}
          path: ${{ github.workspace }}/resinsight_${{ env.RESINSIGHT_VERSION }}.tar.gz
          retention-days: 15

  tests:
    needs: build_dependencies
    if: ${{ always() && needs.build_dependencies.result != 'failed' }}
    name: "tests_${{ matrix.os }}_py-${{ matrix.python-version }}_${{ matrix.test_type }}"
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.8]
        os: [ubuntu-22.04]
        test_type: ['resinsight']
    runs-on: ${{ matrix.os }}
    steps:
      - uses: "actions/checkout@v2"
        with:
          fetch-depth: 0

      - name: "Install dependencies"
        run: |
          pip install --upgrade pip setuptools

      - name: "Install package"
        run: |
          pip install .[test]

      - name: "Test package spinningjenny"
        run: |
          pytest -m "${{ matrix.test_type }}" -sv --hypothesis-profile ci

@kriben
Copy link
Collaborator

kriben commented Oct 23, 2023

Hi @sregales-TNO,

A new version of ResInsight is out (v2023.10). I have been building the branch that became this release on Ubuntu 22.04 without problems for some time. Can you retry in this branch? If you still experience problems building I can investigate more.

--
kb

@sregales-TNO
Copy link
Author

Yes my problem is resolved

@github-actions github-actions bot added the PendingRelease Issues is fixed and will be available in next release label Oct 23, 2023
@magnesj magnesj removed the PendingRelease Issues is fixed and will be available in next release label Dec 11, 2023
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

No branches or pull requests

3 participants