Git Product home page Git Product logo

lunchbox's Introduction

Introduction

Welcome to Lunchbox, a C++ library for multi-threaded programming. Lunchbox was formerly known as eq::base or co::base, the foundation for the Equalizer parallel rendering framework and the Collage network library. It is intended for all application developers creating high-performance multi-threaded programs.

The API documentation can be found on eyescale.github.io. As with any open source project, the available source code, in particular the unit tests provide a reference for developing applications.

Technical questions can be posted to the Equalizer Developer Mailing List, or directly to [email protected].

Commercial support, custom software development and porting services are available from Eyescale. Please contact [email protected] for further information.

Features

Lunchbox provides the following major features to facilitate the development and deployment of multi-threaded applications:

  • Operating System Abstraction: lunchbox::Atomic, lunchbox::Condition, lunchbox::DSO, @ref bitops "bit operations", lunchbox::daemonize(), (lunchbox::Clock, lunchbox::MemoryMap, lunchbox::PerThread, lunchbox::RNG, lunchbox::Thread)
  • High-Performance Threading Primitives: lunchbox::Buffer, lunchbox::LFQueue, lunchbox::LFVector, lunchbox::Monitor, lunchbox::MTQueue, lunchbox::RequestHandler, lunchbox::SpinLock, (lunchbox::Lock, lunchbox::TimedLock)
  • Utility classes: lunchbox::Any, lunchbox::Log, lunchbox::Pool, lunchbox::UnorderedIntervalSet, lunchbox::Future, lunchbox::PersistentMap, (lunchbox::ScopedMutex)
  • Detailed @ref Changelog

Building

Lunchbox is a cross-platform library, designed to run on any modern operating system, including all Unix variants and the Windows operating system. It requires a C++11 compiler and uses CMake to create a platform-specific build environment. The following platforms and build environments are tested:

  • Linux: Ubuntu 16.04, RHEL 6.8 (Makefile, Ninja)
  • Windows: 7 (Visual Studio 2012)
  • Mac OS X: 10.9 (Makefile, Ninja)

Building from source is as simple as:

git clone --recursive https://github.com/Eyescale/Lunchbox.git
mkdir Lunchbox/build
cd Lunchbox/build
cmake -GNinja -DCLONE_SUBPROJECTS=ON ..
ninja

lunchbox's People

Contributors

adevress avatar alkino avatar biddisco avatar bilgili avatar cduelo avatar chevtche avatar cstalder avatar dardok avatar delalond avatar delyas avatar dulley avatar eile avatar jzarl avatar kaabimg avatar karjonas avatar marlam avatar marwan-abdellah avatar probert73 avatar purplekarrot avatar samsellem avatar seifertm avatar steiner- avatar tribal-tec avatar yarda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lunchbox's Issues

byteswap.h not found on Mac OS X

byteswap.h is not found on Mac OS X, apparently the GNU byteswap.h says:
//#warning "byteswap.h is an unportable GNU extension! Don't use!"

Various similar problems exist with other libraries,
and one solution suggests using
the OSX header <libkern/OSByteOrder.h> and
use OSSwapInt32, OSSwapInt64 functions.

In "lunchbox.bitOperation.h"
...

ifdef _MSC_VER

pragma warning (push)

pragma warning (disable: 4985) // inconsistent decl of ceil

include <intrin.h>

pragma warning (pop)

elif defined APPLE

include <libkern/OSByteOrder.h>

define bswap_32 OSSwapInt32

define bswap_64 OSSwapInt64

elif ...

New behaviour for unregisterRequest

I think unregisterRequest should be deprecated and be replaced by a new function that behaves as the new registerRequest, including also the relinquish() call within.
Since the unregisterRequest method is meant to be used only when the request is no longer needed, it shouldn't wait anymore, so a relinquish() call should be implicit. Otherwise it would fall into a double wait() when the destructor gets called.

Build with latest Common CMake modules

124s] /home/abuild/rpmbuild/BUILD/Lunchbox-1.12.0/CMake/common/cpp/test.h:100:51: error: too many arguments to function 'void lunchbox::abort()'
[ 124s] lunchbox::abort( true /dumpThreads/ );
[ 124s] ^
[ 124s] In file included from /home/abuild/rpmbuild/BUILD/Lunchbox-1.12.0/lunchbox/thread.h:24:0,
[ 124s] from /home/abuild/rpmbuild/BUILD/Lunchbox-1.12.0/CMake/common/cpp/test.h:34,
[ 124s] from /home/abuild/rpmbuild/BUILD/Lunchbox-1.12.0/tests/any.cpp:18:
[ 124s] /home/abuild/rpmbuild/BUILD/Lunchbox-1.12.0/lunchbox/debug.h:36:19: note: declared here
[ 124s] LUNCHBOX_API void abort();

See more: https://pmbs.links2linux.de/package/live_build_log/home:awissu:equalizer-qt5/Lunchbox/openSUSE_Tumbleweed/i586

sleep is not signal-safe

Discovered with new unit test in Equalizer: Apparently gpu-sd/avahi uses signals, which causes the test watchdog thread to wake up and terminate early. Make lunchbox::sleep() signal safe.

Lunchbox 1.10.0 - CMake configuration fails in standalone build

I am trying to package Lunchbox for Gentoo Linux. Therefore, I do not follow the official build instructions using Buildyard, but call CMake through the package manager with Buildyard disabled.

While this procedure used to work with Lunchbox 1.9.1, the CMake build fails with 1.10.0. The relevant error should be the following:

CMake Error at CMake/common/clangcheckTargets.cmake:42 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "SOURCES" is not allowed.
Call Stack (most recent call first):
  CMake/common/TargetHooks.cmake:36 (add_clangcheck)
  /usr/share/cmake/Modules/FindThreads.cmake:207 (add_library)
  pthreads/CMakeLists.txt:4 (find_package)
  CMakeLists.txt:64 (include)

The complete build log including the CMake call is available here:
https://gist.github.com/seifertm/932e6ff8205e9b4917e7

Strange .so library version

libLunchbox.so.1.17.0
libLunchbox.so.10

It's due to:

project(Lunchbox VERSION 1.17.0)
set(Lunchbox_VERSION_ABI 10)

IMHO if the SONAME is libLunchbox.so.10, I think the library version should be libLunchbox.so.10.0.0.

perf-persistentMap (Lunchbox) does not link; missing leveldb library in linker

Noticed when compiling Equalizer, details in
Eyescale/Equalizer#498

Ubuntu 14.04.3.
adding the following option (link against libleveldb.so) works. Please fix the CMakeLists.txt. Thanks!
-lleveldb
to the offending line, so that it ends as
/usr/bin/c++ -Wall -Wextra -Winvalid-pch -Winit-self -Wno-unknown-pragmas -Werror -Wshadow -fmax-errors=5 -Wnon-virtual-dtor -Wsign-promo -Wvla -fno-strict-aliasing -std=c++11 -fopenmp -g CMakeFiles/perf-persistentMap.dir/persistentMap.cpp.o -o perf-persistentMap -rdynamic ../../lib/libLunchbox.so.1.12.0 -lboost_regex -lboost_serialization -lboost_filesystem -lboost_system -lboost_thread -lboost_unit_test_framework -lpthread /usr/lib/openmpi/lib/libmpi_cxx.so /usr/lib/openmpi/lib/libmpi.so -ldl -lhwloc ../../lib/libServus.so.1.1.0 -Wl,-rpath,/home/rgarcia/lrz/equalizer/Equalizer/build/lib:/usr/lib/openmpi/lib -lleveldb

perf-memory test segfault

On Fedora Rawhide (f35):

19/29 Test #19: perf-memory ......................***Exception: SegFault  0.19 sec
./perf-memory
  PID.Thread  | Filename:line                    |   ms | Message
   35.1        ox-1.17.0/lunchbox/thread.cpp:155       0 Thread #1 type (anonymous namespace)::Watchdog successfully initialized
   35.Main     hbox-1.17.0/lunchbox/init.cpp:70        0 Log level DEBUG topics 4 date Wed Jun 16 00:40:29 2021
Segmentation fault (core dumped)

Lunchbox does not compile without DNSSD

When trying to compile the git version of Lunchbox (commit e3645e5), the build exits with the following error:

[ 52%] Building CXX object lunchbox/CMakeFiles/Lunchbox.dir/servus.cpp.obj
cd /usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999_build/lunchbox && /usr/bin/x86_64-w64-mingw32-g++  -DBOOST_ALL_NO_LIB -DBOOST_TEST_DYN_LINK -DBoost_NO_BOOST_CMAKE -DCXX_ARRAY_SUPPORTED -DCXX_AUTO_SUPPORTED -DCXX_FINAL_OVERRIDE_SUPPORTED -DCXX_NULLPTR_SUPPORTED -DCXX_SHAREDPTR_SUPPORTED -DCXX_TEMPLATE_ALIAS_SUPPORTED -DCXX_TUPLE_SUPPORTED -DCXX_UNORDERED_MAP_SUPPORTED -DEQ_PLUGIN_BUILD -DHAVE_BYTESWAP_H -DLUNCHBOX_BUILD_DIR=\"/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999_build/\" -DLUNCHBOX_DSO_NAME=\"libLunchbox.dll.3\" -DLUNCHBOX_LITTLEENDIAN -DLUNCHBOX_SHARED -DLUNCHBOX_USE_BOOST=1 -DLUNCHBOX_USE_V1_API=1 -DLUNCHBOX_VERSION=1.9.1 -DLunchbox_EXPORTS -DWARN_DEPRECATED -DWin32=1  -DNDEBUG -O2 -pipe -fomit-frame-pointer  -Wall -Wextra -Winvalid-pch -Winit-self -Wno-unknown-pragmas -Wshadow -fmax-errors=5 -Wnon-virtual-dtor -Wsign-promo -Wvla -fno-strict-aliasing -std=c++11 @CMakeFiles/Lunchbox.dir/includes_CXX.rsp   -o CMakeFiles/Lunchbox.dir/servus.cpp.obj -c /usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999/lunchbox/servus.cpp
/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999/lunchbox/servus.cpp: In member function 'lunchbox::Servus::Result lunchbox::detail::Servus::browse(int32_t)':
/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999/lunchbox/servus.cpp:226:31: error: '_in' was not declared in this scope
/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999/lunchbox/servus.cpp:226:44: error: '_handleEvents' was not declared in this scope
/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999/lunchbox/servus.cpp:227:5: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [lunchbox/CMakeFiles/Lunchbox.dir/servus.cpp.obj] Error 1
make[2]: Leaving directory `/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999_build'
make[1]: *** [lunchbox/CMakeFiles/Lunchbox.dir/all] Error 2
make[1]: Leaving directory `/usr/x86_64-w64-mingw32/tmp/portage/dev-libs/lunchbox-9999/work/lunchbox-9999_build'
make: *** [all] Error 2

If I am not mistaken, _in and _handleEvents are only declared, when LUNCHBOX_USE_DNSSD is set, but they are still referenced outside an #ifdef in line 226.

The changes were introduced with commit a90a2da. Reverting this commit makes Lunchbox compile without errors.

Submodule missing from the release

....
Make Error at CMakeLists.txt:11 (message):
  CMake/common missing, run: git submodule update --init

I tried both the zip and tar.gz files from the release (lunchbox-1.17.0) and the submodule is not there. I think the release should be complete including the submodules, otherwise it complicates the downstream distro packaging (I am trying to get the package into Fedora).

build with cmake for vc11 x64

When I used cmake to config in windows , the erorrs are below:
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Can't find dns_sd.h header file.
Could NOT find DNSSD (missing: _dnssd_LIBRARY _dnssd_INCLUDE_DIR)

So,

  1. How to get PkgConfig?
  2. Where to get Dnssd lib ?

thanks a lot.

static ThreadID::ZERO is used in initialization lists

It seems that ThreadID::ZERO causes SIGSEGV when used in initialization list in LB_TS_VAR macro.

Currently I`m trying to run Lunchbox on Android, and compiling it with arm-gcc. The LFQueue test fails with SIGSEGV because of two structs defined with LB_TS_VAR in lfQueue.h

Problem with lunchbox/string.h "prepend()" method

Lunchbox lunchbox/string.h introduce a function named prepend.

This function is declared and defined in a header but is not tagged as "inline". Triggering a multiple definition error when used inside equalizer.

CMakeFiles/triply.dir/vertexBufferBase.cpp.o: In function lunchbox::string::prepend(std::string const&, std::string const&)': vertexBufferBase.cpp:(.text+0x40): multiple definition of lunchbox::string::prepend(std::string const&, std::string const&)'

@hernando @eile

gcc 4.7 support

Reported externally, gcc 4.7 on Ubuntu 12.10 fails on an unit test:

[ 73%] Building CXX object tests/CMakeFiles/lfVector.dir/lfVector.cpp.o
In file included from /home/stewart/equalizer/Lunchbox/lunchbox/lfVector.h:236:0,
                from /home/stewart/equalizer/Lunchbox/tests/lfVector.cpp:21:
/home/stewart/equalizer/Lunchbox/lunchbox/lfVector.ipp: In function ‘void _runSerialTest() [with V = lunchbox::LFVector<unsigned int>; T = unsigned int]’:
/home/stewart/equalizer/Lunchbox/lunchbox/lfVector.ipp:153:34: error: array subscript is below array bounds [-Werror=array-bounds]
/home/stewart/equalizer/Lunchbox/lunchbox/lfVector.ipp: In function ‘int testMain(int, char**)’:
/home/stewart/equalizer/Lunchbox/lunchbox/lfVector.ipp:153:34: error: array subscript is below array bounds [-Werror=array-bounds]
cc1plus: all warnings being treated as errors
make[3]: *** [tests/CMakeFiles/lfVector.dir/lfVector.cpp.o] Error 1
make[3]: Leaving directory `/home/stewart/equalizer/Lunchbox/Release'
make[2]: *** [tests/CMakeFiles/lfVector.dir/all] Error 2
make[2]: Leaving directory `/home/stewart/equalizer/Lunchbox/Release'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/stewart/equalizer/Lunchbox/Release'
make: *** [install] Error 2

Testsuite failures on armv7hl

Tried to build for fedora-rawhide (f35):

/usr/bin/ctest --force-new-ctest-process 
Test project /builddir/build/BUILD/Lunchbox-1.17.0/redhat-linux-build
      Start  1: any
 1/28 Test  #1: any ..............................   Passed    0.02 sec
      Start  2: anySerialization
 2/28 Test  #2: anySerialization .................   Passed    0.02 sec
      Start  3: bitOperation
 3/28 Test  #3: bitOperation .....................Subprocess aborted***Exception:   0.23 sec
      Start  4: buffer
 4/28 Test  #4: buffer ...........................   Passed    0.22 sec
      Start  5: clock
 5/28 Test  #5: clock ............................   Passed    1.03 sec
      Start  6: debug
 6/28 Test  #6: debug ............................   Passed    0.02 sec
      Start  7: dso
 7/28 Test  #7: dso ..............................   Passed    0.02 sec
      Start  8: file
 8/28 Test  #8: file .............................   Passed    0.02 sec
      Start  9: future
 9/28 Test  #9: future ...........................   Passed    0.41 sec
      Start 10: init
10/28 Test #10: init .............................   Passed    0.02 sec
      Start 11: intervalSet
11/28 Test #11: intervalSet ......................Subprocess aborted***Exception:   0.21 sec
      Start 12: issue1
12/28 Test #12: issue1 ...........................   Passed    0.36 sec
      Start 13: lfQueue
13/28 Test #13: lfQueue ..........................   Passed    1.02 sec
      Start 14: memoryMap
14/28 Test #14: memoryMap ........................   Passed    0.07 sec
      Start 15: monitor
15/28 Test #15: monitor ..........................   Passed    7.12 sec
      Start 16: mtQueue
16/28 Test #16: mtQueue ..........................   Passed    0.47 sec
      Start 17: perThread
17/28 Test #17: perThread ........................   Passed    0.10 sec
      Start 18: perf-lfVector
18/28 Test #18: perf-lfVector ....................   Passed    2.37 sec
      Start 19: perf-mutex
19/28 Test #19: perf-mutex .......................   Passed    7.72 sec
      Start 20: perf-rwLock
20/28 Test #20: perf-rwLock ......................   Passed   10.46 sec
      Start 21: pluginFactory
21/28 Test #21: pluginFactory ....................   Passed    0.01 sec
      Start 22: refPtr
22/28 Test #22: refPtr ...........................   Passed    5.19 sec
      Start 23: requestHandler
23/28 Test #23: requestHandler ...................   Passed    0.02 sec
      Start 24: result
24/28 Test #24: result ...........................Subprocess aborted***Exception:   0.21 sec
      Start 25: rng
25/28 Test #25: rng ..............................   Passed    0.71 sec
      Start 26: string
26/28 Test #26: string ...........................Subprocess aborted***Exception:   0.20 sec
      Start 27: thread
27/28 Test #27: thread ...........................   Passed    2.87 sec
      Start 28: threadPool
28/28 Test #28: threadPool .......................   Passed    1.11 sec
86% tests passed, 4 tests failed out of 28

lunchbox::_logInstance's tls_.impl_ isn't guaranteed to be constructed, resulting in SEGFAULT

The instance of XXXX::detail::PageThread::PageThread is static and inherits from lunchbox::Thread. It
calls setName( "Main" ); in its ctor, before lunchbox::_logInstance is ctor'd:

#0  0x00007ffff5413835 in lunchbox::TLS::get (this=0x7ffff582f748 <lunchbox::_logInstance+8>) at /YYYY/Lunchbox/lunchbox/tls.cpp:66
#1  0x00007ffff540ecd8 in lunchbox::PerThread<lunchbox::Log, &lunchbox::perThreadDelete<lunchbox::Log> >::get (this=0x7ffff582f740 <lunchbox::_logInstance>) at /YYYY/Lunchbox/lunchbox/perThread.ipp:43
#2  0x00007ffff540d6d5 in lunchbox::Log::instance () at /YYYY/Lunchbox/lunchbox/log.cpp:327
#3  0x00007ffff5411325 in lunchbox::Thread::setName (name="Main") at /YYYY/Lunchbox/lunchbox/thread.cpp:304
#4  0x00007ffff4ff5b6d in XXXX::detail::PageThread::PageThread (this=0x7ffff582b320 <XXXX::(anonymous namespace)::pageThread_>) at /YYYY/XXXX/XXXXIndex.cpp:648
#5  0x00007ffff4ff3ad6 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /YYYY/XXXX/XXXXIndex.cpp:756
#6  0x00007ffff4ff3b11 in _GLOBAL__sub_I_XXXXIndex.cpp(void) () at /YYYY/XXXX/XXXXIndex.cpp:821
....
#34 0x00007ffff7811830 in __libc_start_main (main=0x49dab0 <main>, argc=1, argv=0x7fffffffe2d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe2c8)
at ../csu/libc-start.c:291
#35 0x000000000049d9d9 in _start ()

Because static init is arbitrary, tls_'s impl_.get() fails:

(gdb) p impl_
$1 = (lunchbox::detail::TLS * const) 0x0

I can work around it by forcing XXXX to be ctor'd later, but this may hit other people too.

error: sys/uio.h on Windows using MinGW-64

In file included from E:/BackUp/source/Equalizer/1.6.0/Buildyard/src/Lunchbox/lunchbox/compressor/snappy/snappy.h:45:0,
from E:/BackUp/source/Equalizer/1.6.0/Buildyard/src/Lunchbox/lunchbox/compressor/compressorSnappy.cpp:20:
E:/BackUp/source/Equalizer/1.6.0/Buildyard/src/Lunchbox/lunchbox/compressor/snappy/snappy-stubs-public.h:48:21: fatal error: sys/uio.h: No such file or directory
#include <sys/uio.h>
^
compilation terminated.
lunchbox/CMakeFiles/Lunchbox.dir/build.make:418: recipe for target 'lunchbox/CMakeFiles/Lunchbox.dir/compressor/compressorSnappy.cpp.obj' failed

Hide pthread from API

  • create pthread tls API to hide pthread calls
  • use in perThread(Ref).h
  • remove Crude test if pthread.h was included

MVS 2012 warning break build

3>D:\B7\Buildyard-master\src\Lunchbox\tests\requestHandler.cpp(72): error C2220: warning treated as error - no 'object' file generated
3>D:\B7\Buildyard-master\src\Lunchbox\tests\requestHandler.cpp(72): warning C4305: 'argument' : truncation from 'int' to 'const bool'

/WX compiler flag

this warning/error break build in buildyard

I solve this -> //TEST( future == 0xC0FFEE );
or TEST( future.get() == 0xC0FFEE ); // i don't know if it is right :D

Potential data race in Thread::start() and Thread::_runChild()

Hi all,

Our bug scanner has reported a data race issue at thread.cpp#L131 and thread.cpp#L202.

Followings are code snippets.

void Thread::_runChild()
{
    setName(boost::lexical_cast<std::string>(_impl->index));
    _impl->id._impl->pthread = pthread_self();

and

bool Thread::start()
{
    ...
    // avoid memleak, we don't use pthread_join
    pthread_detach(_impl->id._impl->pthread);

The race occurs when _impl->id._impl->pthread = pthread_self(); and pthread_detach(_impl->id._impl->pthread); are executed simultaneously.

SourceBrella Inc.,
Yu

skv::PersistentMap

Does skv::PersistentMap not implement getValues() and takeValues ? Or, may I not use skv?

The errers are:

/home/lxq/eq/Equalizer/Lunchbox/lunchbox/persistentMap.cpp: In function ‘lunchbox::detail::PersistentMap* {anonymous}::_newImpl(const servus::URI&)’:
/home/lxq/eq/Equalizer/Lunchbox/lunchbox/persistentMap.cpp:73:54: error: invalid new-expression of abstract class type ‘lunchbox::skv::PersistentMap’
return new lunchbox::skv::PersistentMap( uri );
^
In file included from /home/lxq/eq/Equalizer/Lunchbox/lunchbox/persistentMap.cpp:56:0:
/home/lxq/eq/Equalizer/Lunchbox/lunchbox/skv/persistentMap.h:43:7: note: because the following virtual functions are pure within ‘lunchbox::skv::PersistentMap’:
class PersistentMap : public detail::PersistentMap
^
/home/lxq/eq/Equalizer/Lunchbox/lunchbox/persistentMap.cpp:38:18: note: virtual void lunchbox::detail::PersistentMap::getValues(const Strings&, const ConstValueFunc&) const
virtual void getValues( const Strings& keys,
^
/home/lxq/eq/Equalizer/Lunchbox/lunchbox/persistentMap.cpp:40:18: note: virtual void lunchbox::detail::PersistentMap::takeValues(const Strings&, const ValueFunc&) const
virtual void takeValues( const Strings& keys,
^
lunchbox/CMakeFiles/Lunchbox.dir/build.make:446: recipe for target 'lunchbox/CMakeFiles/Lunchbox.dir/persistentMap.cpp.o' failed
make[2]: *** [lunchbox/CMakeFiles/Lunchbox.dir/persistentMap.cpp.o] Error 1
CMakeFiles/Makefile2:3472: recipe for target 'lunchbox/CMakeFiles/Lunchbox.dir/all' failed
make[1]: *** [lunchbox/CMakeFiles/Lunchbox.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

Atomic in std::vector on Win32 causes build error

The alignment causes problems on Win32 (VS2008 & 2010) if an atomic is stored in a std::vector like in eq/client/detail/channel.ipp:74 where you get this error:

1>Compiling...
1>channel.cpp
1>D:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vector(717) : error C2719: '_Val': formal parameter with __declspec(align('8')) won't be aligned
1> e:\dev\buildyard\src\equalizer\libs\eq\client\detail/channel.ipp(78) : see reference to class template instantiation 'std::vector<_Ty>' being compiled
1> with
1> [
1> _Ty=eq::detail::Channel::FrameStatistics
1> ]

Learn why: http://thetweaker.wordpress.com/2010/05/05/stdvector-of-aligned-elements/

Monitor: race for non-atomic reads

When using the monitor with non-atomic variables, e.g., uint128_t, the waitFoo() functions are not thread safe since they compare the value outside the lock first.

Solve by always comparing inside mutex and providing specializations for save 'T's

Package CMake modules in the release tar-ball

As I mentioned in a previous issue, I am currently trying to package Lunchbox for Gentoo Linux. While the standard build with Buildyard works nicely, I fear that a Lunchbox package cannot make it into the official package list of Gentoo (the Portage Tree), because the CMake build loads external dependencies during build time.

Loading the CMake modules through git causes two problems from my point of view:

  • If the loaded CMake modules are not verified after the download, there is a risk that the build uses compromised CMake files, posing a potential security threat.
  • There is no possibility to install the Lunchbox package without a running Internet connection

I don't know much about other distributions' packaging policies, but I imagine that they had similar concerns.

Is there a possibility that the CMake modules will be included in future releases?

cmake errors

When I use cmake to generate Visual Studio 2013 project, it shows following cmake entries and values:
Name Value
_LIBRARY_DEBUG Boost_THREAD
_LIBRARY_RELEASE Boost_THREAD

But, I have correctly set Boost_THREAD_LIBRARY_DEBUG and Boost_THREAD_LIBRARY_RELEASE

Can anyone tell me what happen, and how to solve ?

Missing header in install() phase lunchbox/string.h

Some BBP viz components including BBPSDK uses the header lunchbox/string.h

However, this one is never installed because not part of the install() phase of Lunchbox. Making impossible to compile BBPSDK if it does not embed Lunchbox.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.