Compiling on different plattforms.

Issue #14 closed
Former user created an issue

Hello,

As by change I have been building this software with MSYS2 - 8.3.0 compiler in MINGW64. There are some small issues with cmake and building the library (dll), however this works.

Now I tried to compile with Ubuntu 18.04, I tried both gcc-7 and gcc-8 and both variants. Here I get some issue when building "UncompressedFile.cpp" (Sorry don't have the printout available right now). I can paste it later today.

One question to you, what is your version of compiler and distribution?

Best regards Petter

Comments (10)

  1. Petter Strandh

    I found the reason. Currently vector_BLF only compiles on 64 bit, I know it says so compiling for win 64 bit. Just tried with 32bit and compared one gets these compiler errors.

    /vector_blf/src/Vector/BLF/UncompressedFile.cpp: In constructor 'Vector::BLF::UncompressedFile::UncompressedFile()':
    /vector_blf/src/Vector/BLF/UncompressedFile.cpp:44:38: warning: overflow in implicit constant conversion [-Woverflow]
    m_defaultLogContainerSize(0x20000)

    These first lines are not the compile error.

    C:/msys64/mingw32/include/c++/7.4.0/bits/postypes.h:178:7: note: candidate: std::fpos<_StateT> std::fpos<_StateT>::operator+(std::streamoff) const [with _StateT = int; std::streamoff = long long int]
    operator+(streamoff __off) const
    /vector_blf/src/Vector/BLF/UncompressedFile.cpp:73:18: error: ambiguous overload for 'operator+' (operand types are 'std::streampos {aka std::fpos<int>}' and 'const streamsize {aka const int}')
    (m_tellg + n > m_fileSize);

    It is only UncompressedFile.cpp that is affected by this.

    Best regards

    Petter

  2. Tobias Lorenz repo owner

    Hello,

    As by change I have been building this software with MSYS2 - 8.3.0 compiler in MINGW64. There are some small issues with cmake and building the library (dll), however this works.

    Now I tried to compile with Ubuntu 18.04, I tried both gcc-7 and gcc-8 and both variants. Here I get some issue when building "UncompressedFile.cpp" (Sorry don't have the printout available right now). I can paste it later today.

    One question to you, what is your version of compiler and distribution?

    Best regards Petter

  3. Petter Strandh

    Hello.

    No that does not fix the problem. seems to be some thing wrong with something else.

    Now I managed to build and I get the same result on Ubuntu 18.04 with multilib and zlib1g-dev:i386, g++-multilib, gcc-multilib


    Building with:

    cmake -DCMAKE_TOOLCHAIN_FILE=../32BIT_TOOLCHAIN.cmake ..

    generates: https://pastebin.com/qjMRnB6H

    compiling in 64bit generates No errors. Compiling on a 32bit machine. same errors on gcc5, gcc7, gcc8. I am a bit puzzled myself.

    File: 32BIT_TOOLCHAIN.cmake

    set(CMAKE_SYSTEM_NAME Linux)
    set(CMAKE_SYSTEM_VERSION 1)
    set(CMAKE_SYSTEM_PROCESSOR "i686")

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")

  4. Petter Strandh

    Hello Tobias,

    I can confirm that it builds on MSYS2 32bit mode and on 32bit ARM (arm-linux-gnueabihf) . I also tried the parser example and it does its trick on one of my blf files.

    Best regards

    Petter

  5. Log in to comment