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

build failure with clang #99

Open
ilovezfs opened this issue Aug 1, 2017 · 2 comments
Open

build failure with clang #99

ilovezfs opened this issue Aug 1, 2017 · 2 comments

Comments

@ilovezfs
Copy link

ilovezfs commented Aug 1, 2017

Testing 98b4105 on macOS, the build fails with clang.

If I recompile protobuf with gcc 7, and also build upscaledb with gcc 7, then the build succeeds.

Full clang build log: https://gist.github.com/ilovezfs/378687cd13c350ddabdc6eb531102417

The failure is

bash-3.2$ make -j1 V=1
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /private/tmp/upscaledb-20170801-55163-1a296hv/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in 3rdparty
Making all in liblzf
make[3]: Nothing to be done for `all'.
Making all in murmurhash3
make[3]: Nothing to be done for `all'.
Making all in libfor
make[3]: Nothing to be done for `all'.
Making all in libvbyte
make[3]: Nothing to be done for `all'.
Making all in json
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
Making all in 2protoserde
make[3]: Nothing to be done for `all'.
Making all in 2protobuf
make[3]: Nothing to be done for `all'.
Making all in 5server
make[3]: Nothing to be done for `all'.
/bin/sh ../libtool  --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -DUPS_ENABLE_ENCRYPTION -DUPS_ENABLE_REMOTE -I/usr/local/Cellar/upscaledb/HEAD-98b4105/libexec/libuv/include -I/usr/local/opt/openssl/include -F/usr/local/Frameworks   -I/usr/local/Cellar/upscaledb/HEAD-98b4105/libexec/libuv/include -Os -w -pipe -march=native -mmacosx-version-min=10.11 -I/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/include/darwin -DNDEBUG -c -o 3blob_manager/blob_manager_disk.lo 3blob_manager/blob_manager_disk.cc
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -DUPS_ENABLE_ENCRYPTION -DUPS_ENABLE_REMOTE -I/usr/local/Cellar/upscaledb/HEAD-98b4105/libexec/libuv/include -I/usr/local/opt/openssl/include -F/usr/local/Frameworks -I/usr/local/Cellar/upscaledb/HEAD-98b4105/libexec/libuv/include -Os -w -pipe -march=native -mmacosx-version-min=10.11 -I/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/include/darwin -DNDEBUG -c 3blob_manager/blob_manager_disk.cc  -fno-common -DPIC -o 3blob_manager/.libs/blob_manager_disk.o
In file included from 3blob_manager/blob_manager_disk.cc:30:
./2device/device_disk.h:114:13: error: call to deleted constructor of 'upscaledb::DiskDevice::State'
      State state = std::move(m_state);
            ^       ~~~~~~~~~~~~~~~~~~
./2device/device_disk.h:58:7: note: 'State' has been explicitly marked deleted here
      State(const State&) = delete;
      ^
./2device/device_disk.h:155:13: error: call to deleted constructor of 'upscaledb::DiskDevice::State'
      State state = std::move(m_state);
            ^       ~~~~~~~~~~~~~~~~~~
./2device/device_disk.h:58:7: note: 'State' has been explicitly marked deleted here
      State(const State&) = delete;
      ^
In file included from 3blob_manager/blob_manager_disk.cc:21:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:625:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:3615:9: error: call to deleted constructor of 'upscaledb::DiskDevice::State'
    _Tp __t(_VSTD::move(__x));
        ^   ~~~~~~~~~~~~~~~~
./2device/device_disk.h:81:10: note: in instantiation of function template specialization 'std::__1::swap<upscaledb::DiskDevice::State>' requested here
                  std::swap(oldState, newState);
                       ^
./2device/device_disk.h:58:7: note: 'State' has been explicitly marked deleted here
      State(const State&) = delete;
      ^
In file included from 3blob_manager/blob_manager_disk.cc:21:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:625:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:3616:9: error: overload resolution selected deleted operator '='
    __x = _VSTD::move(__y);
    ~~~ ^ ~~~~~~~~~~~~~~~~
./2device/device_disk.h:59:14: note: candidate function has been explicitly deleted
      State& operator=(const State&) = delete;
             ^
./2device/device_disk.h:62:14: note: candidate function not viable: no known conversion from 'upscaledb::DiskDevice::State' to 'upscaledb::DiskDevice::State &&' for 1st argument
      State& operator=(State&& ) = default;
             ^
4 errors generated.
make[3]: *** [3blob_manager/blob_manager_disk.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
bash-3.2$
@ilovezfs
Copy link
Author

ilovezfs commented Aug 1, 2017

Note that this failure occurs after first hacking around #96 with

diff --git a/3rdparty/libvbyte/vbyte.cc b/3rdparty/libvbyte/vbyte.cc
index 6faf792..46255b8 100644
--- a/3rdparty/libvbyte/vbyte.cc
+++ b/3rdparty/libvbyte/vbyte.cc
@@ -24,10 +24,6 @@ typedef signed char int8_t;
 #  include <stdint.h>
 #endif
 
-#if defined(__AVX__) || defined(__AVX2__) || defined(__SSE4__)
-#  define USE_MASKEDVBYTE 1
-#endif
-
 #include "vbyte.h"
 #include "varintdecode.h"
 

@cruppstahl
Copy link
Owner

cruppstahl commented Aug 1, 2017 via email

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

2 participants