Commit 79681ed9 authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Fix linux build

parent aee870d6
......@@ -3,9 +3,9 @@ macro(BuildZlib)
list(APPEND ZLIB_LIBS_LIST "lib/zlib.lib")
list(APPEND ZLIB_DLLS_LIST "bin/zlib.dll")
elseif (APPLE)
list(APPEND ZLIB_LIBS_LIST "lib/zlib.dylib")
list(APPEND ZLIB_LIBS_LIST "lib/libz.dylib")
else()
list(APPEND ZLIB_LIBS_LIST "lib/zlib.so")
list(APPEND ZLIB_LIBS_LIST "lib/libz.so")
endif()
BuildExternal(zlib ${zlib_VERSION} ${zlib_SOURCE_DIR} "${ZLIB_LIBS_LIST}" "${ZLIB_DLLS_LIST}" "")
......
......@@ -9,6 +9,7 @@ find_package(Threads)
if (UNIX)
add_definitions(-Wreturn-type)
add_compile_options(-fPIC)
endif()
include(CMake/Fetch3rdParty.cmake)
......
......@@ -44,8 +44,8 @@ namespace OpenVDS
struct IORange
{
size_t start = 0;
size_t end = 0;
size_t start;
size_t end;
};
class IOManager
......
......@@ -128,7 +128,7 @@ namespace OpenVDS
if (range.end)
{
char rangeHeaderBuffer[100];
snprintf(rangeHeaderBuffer, sizeof(rangeHeaderBuffer), "bytes=%d-%d", range.start, range.end);
snprintf(rangeHeaderBuffer, sizeof(rangeHeaderBuffer), "bytes=%zu-%zu", range.start, range.end);
object_request.SetRange(rangeHeaderBuffer);
}
using namespace std::placeholders;
......
......@@ -17,6 +17,8 @@
#pragma once
#include <stddef.h>
namespace OpenVDS
{
template<typename T, size_t N>
......
......@@ -22,6 +22,7 @@
#include <Math/Vector.h>
#include <string>
#include <vector>
namespace OpenVDS
{
......
......@@ -20,6 +20,7 @@
#include "cxxopts.hpp"
#include <cstdlib>
#include <climits>
#include <json/json.h>
#include <assert.h>
......
......@@ -29,6 +29,7 @@
#include "cxxopts.hpp"
#include <cstdlib>
#include <climits>
#include <json/json.h>
#include <algorithm>
......
......@@ -18,6 +18,7 @@
#include "Base64.h"
#include <cctype>
#include <cstring>
namespace OpenVDS
{
......
......@@ -57,7 +57,7 @@ public:
bool isEmpty() const
{
assert(!!m_firstItem == !!m_lastItem);
return mm_firstItem == NULL;
return m_firstItem == NULL;
}
Item *getFirstItem() const { return m_firstItem; }
......
......@@ -23,6 +23,7 @@
#include <unordered_map>
#include <mutex>
#include <list>
#include <memory>
#include <OpenVDS/VolumeData.h>
......
......@@ -159,17 +159,17 @@ static IORange calculateRangeHeaderImpl(const ParsedMetadata& parsedMetadata, co
*adaptiveLevel = -1;
}
else
{
{
*adaptiveLevel = getEffectiveAdaptiveLevel(AdaptiveMode_BestQuality, 0.01f, 1.0f , metadataStatus.m_compressionTolerance, metadataStatus.m_adaptiveLevelSizes, metadataStatus.m_uncompressedSize);
int range = waveletAdaptiveLevelsMetadataDecode(parsedMetadata.m_chunkSize, *adaptiveLevel, parsedMetadata.m_adaptiveLevels.data());
if (range && range != parsedMetadata.m_chunkSize)
{
return {0 , size_t(range - 1)};
return { size_t(0) , size_t(range - 1 ) };
}
}
return IORange();
return { 0 , 0 };
}
static VolumeDataLayer *getVolumeDataLayer(VolumeDataLayout const *layout, DimensionsND dimension, int channel, int lod, bool isAllowFailure)
......@@ -437,7 +437,7 @@ static std::string makeURLForChunk(const std::string &layerUrl, uint64_t chunk)
{
char url[1000];
snprintf(url, sizeof(url), "%s/%" PRIu64, layerUrl.c_str(), (long long)chunk);
snprintf(url, sizeof(url), "%s/%" PRIu64, layerUrl.c_str(), chunk);
return std::string(url);
}
......@@ -562,4 +562,4 @@ bool VolumeDataAccessManagerImpl::readChunk(const VolumeDataChunk &chunk, std::v
return true;
}
}
\ No newline at end of file
}
......@@ -23,6 +23,8 @@
#include "Bitmask.h"
#include <condition_variable>
namespace OpenVDS
{
......
......@@ -219,7 +219,7 @@ bool deserializeVolumeData(const std::vector<uint8_t> &serializedData, VolumeDat
if (status != Z_OK)
{
fprintf(stderr, "Space", "zlib uncompress failed (status %d) in VolumeDataStore_c::DeSerialize\n", status);
fprintf(stderr, "zlib uncompress failed (status %d) in VolumeDataStore_c::DeSerialize\n", status);
return NULL;
}
......
......@@ -112,7 +112,6 @@ static int32_t findTransformMethod(IntVector3 (&bandSize)[TRANSFORM_MAX_ITERATIO
bandSize[i] = {sizeX, sizeY, sizeZ};
char mask = 0;
char and = 0;
if (sizeX >= WAVELET_BAND_MIN_SIZE) mask |= 1;
if (sizeY >= WAVELET_BAND_MIN_SIZE) mask |= 2;
......
......@@ -23,6 +23,7 @@
#include <omp.h>
#include <algorithm>
#include <math.h>
#include "FSE/fse.h"
......@@ -1210,4 +1211,4 @@ int32_t waveletAdaptiveLL_DecompressLossless(uint8_t *in, float *pic, int32_t si
return (int)(in + totalSize - start);
}
}
\ No newline at end of file
}
......@@ -40,6 +40,6 @@ target_include_directories(segy_tests PRIVATE ../src/SEG-Y)
add_test_executable(vds_integration_tests
VDS/VDSIntegrationTest.cpp
VDS/ParseVDSJsonTest.cpp
VDS/DeSerializeVolumeDataTest.cpp
VDS/DeserializeVolumeDataTest.cpp
)
target_compile_definitions(vds_integration_tests PRIVATE -DTEST_DATA_PATH="${PROJECT_SOURCE_DIR}/tests/VDS")
......@@ -22,6 +22,7 @@
#include <IO/File.h>
#include <cstdlib>
#include <cmath>
#include <gtest/gtest.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment