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

Compile libmysql error in linux #5046

Closed
Praying opened this issue Dec 28, 2018 · 4 comments
Closed

Compile libmysql error in linux #5046

Praying opened this issue Dec 28, 2018 · 4 comments
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Praying
Copy link

Praying commented Dec 28, 2018

Package: libmysql:x64-linux
Vcpkg version: 2018.11.23-unknownhash

The Message as follow:

➜ vcpkg git:(master) ./vcpkg install libmysql
The following packages will be built and installed:
libmysql[core]:x64-linux
Starting package 1/1: libmysql:x64-linux
Building package libmysql[core]:x64-linux...
-- Using cached /home/ran/SourceCode/vcpkg/downloads/mysql-mysql-server-mysql-8.0.4.tar.gz
-- Using source at /home/ran/SourceCode/vcpkg/buildtrees/libmysql/src/ysql-8.0.4-6271934d70
-- Applying patch /home/ran/SourceCode/vcpkg/ports/libmysql/ignore-boost-version.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Applying patch /home/ran/SourceCode/vcpkg/ports/libmysql/system-libs.patch
-- Applying patch failed. This is expected if this patch was previously applied.
-- Configuring x64-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:56 (message):
Command failed: /home/ran/SourceCode/vcpkg/downloads/tools/cmake-3.12.4-linux/cmake-3.12.4-Linux-x86_64/bin/cmake;/home/ran/SourceCode/vcpkg/buildtrees/libmysql/src/ysql-8.0.4-6271934d70;-DWITHOUT_SERVER=ON;-DWITH_UNIT_TESTS=OFF;-DENABLED_PROFILING=OFF;-DWIX_DIR=OFF;-DHAVE_LLVM_LIBCPP_EXITCODE=1;-DSTACK_DIRECTION=-1;-DWINDOWS_RUNTIME_MD=ON;-DIGNORE_BOOST_VERSION=ON;-DWITH_SSL=system;-DWITH_ICU=system;-DWITH_LIBEVENT=system;-DWITH_LZMA=system;-DWITH_LZ4=system;-DWITH_ZLIB=system;-DCMAKE_MAKE_PROGRAM=/home/ran/SourceCode/vcpkg/downloads/tools/ninja-1.8.2-linux/ninja;-DCMAKE_SYSTEM_NAME=Linux;-DBUILD_SHARED_LIBS=OFF;-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/ran/SourceCode/vcpkg/scripts/toolchains/linux.cmake;-DVCPKG_TARGET_TRIPLET=x64-linux;-DVCPKG_PLATFORM_TOOLSET=external;-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON;-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON;-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON;-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE;-DCMAKE_VERBOSE_MAKEFILE=ON;-DVCPKG_APPLOCAL_DEPS=OFF;-DCMAKE_TOOLCHAIN_FILE=/home/ran/SourceCode/vcpkg/scripts/buildsystems/vcpkg.cmake;-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON;-DVCPKG_CXX_FLAGS=;-DVCPKG_CXX_FLAGS_RELEASE=;-DVCPKG_CXX_FLAGS_DEBUG=;-DVCPKG_C_FLAGS=;-DVCPKG_C_FLAGS_RELEASE=;-DVCPKG_C_FLAGS_DEBUG=;-DVCPKG_CRT_LINKAGE=dynamic;-DVCPKG_LINKER_FLAGS=;-DCMAKE_INSTALL_LIBDIR:STRING=lib;-DCMAKE_INSTALL_BINDIR:STRING=bin;-G;Ninja;-DCMAKE_BUILD_TYPE=Debug;-DCMAKE_INSTALL_PREFIX=/home/ran/SourceCode/vcpkg/packages/libmysql_x64-linux/debug
Working Directory: /home/ran/SourceCode/vcpkg/buildtrees/libmysql/x64-linux-dbg
See logs for more information:
/home/ran/SourceCode/vcpkg/buildtrees/libmysql/config-x64-linux-dbg-out.log
/home/ran/SourceCode/vcpkg/buildtrees/libmysql/config-x64-linux-dbg-err.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:266 (vcpkg_execute_required_process)
ports/libmysql/portfile.cmake:37 (vcpkg_configure_cmake)
scripts/ports.cmake:71 (include)

Error: Building package libmysql:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: libmysql:x64-linux
Vcpkg version: 2018.11.23-unknownhash

Additionally, attach any relevant sections from the log files above.

@scttgs0
Copy link
Contributor

scttgs0 commented Jan 3, 2019

I had the same problem. Tracked the issue down to the use of CMAKE_SYSTEM_PROCESSOR when not cross-compiling. CMAKE_SYSTEM_PROCESSOR was undefined, so I reverted to the use of CMAKE_HOST_SYSTEM_PROCESSOR (due to not in a cross-compiling situation).

Refer to attached patch.
linux_libmysql.patch.zip

@PhoebeHui PhoebeHui added the category:port-bug The issue is with a library, which is something the port should already support label Jan 16, 2019
@mcraveiro
Copy link
Contributor

Hi,

I've applied @scttgs0 's patch to current master and it allowed me to go a bit further but then failed with the following error:

/usr/bin/c++  -DHAVE_CONFIG_H -DHAVE_LIBEVENT2 -DHAVE_OPENSSL -DRAPIDJSON_NO_SIZETYPEDEFINE -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_USE_MATH_DEFINES -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. -Iinclude -Irapid -I/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70 -I/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/include -I/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/rapid -Ilibbinlogevents/include -I/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/libbinlogevents/export -isystem /some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/extra/libedit/editline -isystem /some_location/vcpkg/libodb/installed/x64-linux/include -isystem /some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/extra/rapidjson/include -fPIC -Wall -Wextra -Wformat-security -Wvla -Wmissing-format-attribute -Wundef -Woverloaded-virtual -Wno-missing-field-initializers -Wimplicit-fallthrough=2 -Wlogical-op -Werror -fPIC -g -fno-omit-frame-pointer -std=c++11  -DENABLED_DEBUG_SYNC -DSAFE_MUTEX -MD -MT vio/CMakeFiles/vio.dir/vio.cc.o -MF vio/CMakeFiles/vio.dir/vio.cc.o.d -o vio/CMakeFiles/vio.dir/vio.cc.o -c /some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/vio/vio.cc
/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/vio/vio.cc: In function ‘bool vio_reset(Vio*, enum_vio_type, my_socket, void*, uint)’:
/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/vio/vio.cc:319:39: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘Vio’ {aka ‘struct st_vio’} with no trivial copy-assignment [-Werror=class-memaccess]
     memcpy(vio, &new_vio, sizeof(*vio));
                                       ^
In file included from /some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/vio/vio_priv.h:37,
                 from /some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/vio/vio.cc:46:
/some_location/vcpkg/libodb/buildtrees/libmysql/src/ysql-8.0.4-6271934d70/include/violite.h:296:8: note: ‘Vio’ {aka ‘struct st_vio’} declared here
 struct st_vio
        ^~~~~~
cc1plus: all warnings being treated as errors

To the untrained eye, it seems like -Wall is on, but some warnings are still present on Linux (at least).

@plieblang
Copy link

For me, the patch fixed the issue and libmysql installed properly. Many thanks.

@JackBoosY
Copy link
Contributor

Hi @Praying, thanks for reporting this issue!
I've fixed this issue. Please update vcpkg and rebuild libmysql.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

6 participants