Compiling on different plattforms.
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)
-
-
repo owner - changed status to open
-
repo owner -
assigned issue to
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
-
assigned issue to
-
repo owner Hi,
I added an integer literal, which declares the 0x20000 in question as being unsigned long int (32-bit).
The change is here: https://bitbucket.org/tobylorenz/vector_blf/branch/explicit_const_type
Can you check if this solves your issue?Bye
Tobias -
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")
-
repo owner Hi Petter, issue
#15seems to be related. I provided a fix https://bitbucket.org/tobylorenz/vector_blf/commits/91a0ae0c43332718e9fac467e35dea827c6ce49e that should solve the issue with the operators. Can you check whether this works? Thanks, Tobias -
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
-
repo owner Great. Then I’ll close this ticket.
-
repo owner - changed status to resolved
-
repo owner - changed status to closed
- Log in to comment
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