poco
poco copied to clipboard
GNU MAKE Dependent Library Order Issues
Describe the bug Some libraries do not appear due to incorrect dependency library order when building GNU MAKE
To Reproduce
./configure --config=linux_debian-x86_64-4.4-gcc --no-wstring --no-fpenvironment --omit=Data/ODBC,Data/MySQL,Data/PostgreSQL,MongoDB,Redis --library-path=/home/user/workspace/Prebuild/openssl/platform/linux_debian-x86_64-4.4/lib --include-path=/home/user/workspace/Prebuild/openssl/include
cp /home/user/workspace/Prebuild/poco/poco-build-config/linux_debian-x86_64-4.4-gcc /home/user/workspace/Prebuild/src/poco-1.12.2-all/build/config/linux_debian-x86_64-4.4-gcc
make clean
make distclean
make -j4
List of libraries printed at the time of the first build :
- libCppUnit
- libPocoCrypto
- libPocoData
- libPocoEncodings
- libPocoFoundation
- libPocoJSON
- libPocoNet
- libPocoUtil
- libPocoXML
- libPocoZip
Some libraries are missing
There was no error log when building.
Proceed with the build again.
※ Do not makeclean
make -j4
List of libraries created after the second build:
- libCppunit
- libPocoActiveRecord
- libPocoCrypto
- libPocoData
- libPocoDataSQLite
- libPocoEncodings
- libPocoFoundation
- libPocoJSON
- libPocoJWT
- libPocoNet
- libPocoNetSSL
- libPocoPrometheusd
- libPocoUitl
- libPocoXML
- libPocoZip
There are no system changes between the first build and the second build. It's just that we built it again while keeping the existing built library So I suspect that the dependency relationship is wrong.
Please add relevant environment information:
- OS Type and Version
- Third-party product (eg. database or library) type and version
root@ubuntu:/var/cache/apt/archives# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.7 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
root@ubuntu:/var/cache/apt/archives# uname -a
Linux ubuntu 4.4.0-186-generic #216-Ubuntu SMP Wed Jul 1 05:34:05 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/var/cache/apt/archives# git --version
git version 2.7.4
root@ubuntu:/var/cache/apt/archives# gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@ubuntu:/var/cache/apt/archives# g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@ubuntu:/var/cache/apt/archives# cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
root@ubuntu:/var/cache/apt/archives# perl --version
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
(with 77 registered patches, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
-
POCO Version
Release 1.12.2
-
GCC Config (linux_debian-x86_64-4.4-gcc)
#
# Linux
#
# Make settings for Linux/gcc
#
#
#
# General Settings
#
LINKMODE ?= SHARED
SANITIZEFLAGS ?=
#
# Define Tools
#
CC = ${CROSS_COMPILE}gcc
CXX = ${CROSS_COMPILE}g++
LINK = $(CXX)
LIB = ${CROSS_COMPILE}ar -cr
RANLIB = ${CROSS_COMPILE}ranlib
SHLIB = $(CXX) -shared -Wl,-soname,$(notdir $@) -o $@
SHLIBLN = $(POCO_BASE)/build/script/shlibln
STRIP = ${CROSS_COMPILE}strip
DEP = $(POCO_BASE)/build/script/makedepend.gcc
SHELL = sh
RM = rm -rf
CP = cp
MKDIR = mkdir -p
#
# Extension for Shared Libraries
#
SHAREDLIBEXT = .so.$(target_version)
SHAREDLIBLINKEXT = .so
#
# Compiler and Linker Flags
#
CFLAGS = $(SANITIZEFLAGS) -std=c11
CFLAGS32 =
CFLAGS64 =
CXXFLAGS = $(SANITIZEFLAGS) -std=c++14 -Wall -Wno-sign-compare
CXXFLAGS32 =
CXXFLAGS64 =
LINKFLAGS = $(SANITIZEFLAGS)
LINKFLAGS32 =
LINKFLAGS64 =
STATICOPT_CC =
STATICOPT_CXX =
STATICOPT_LINK = -static
SHAREDOPT_CC = -fPIC
SHAREDOPT_CXX = -fPIC
SHAREDOPT_LINK = -Wl,-rpath,$(LIBPATH)
DEBUGOPT_CC = -g -D_DEBUG
DEBUGOPT_CXX = -g -D_DEBUG
DEBUGOPT_LINK = -g
RELEASEOPT_CC = -O2 -DNDEBUG
RELEASEOPT_CXX = -O2 -DNDEBUG
RELEASEOPT_LINK = -O2
#
# System Specific Flags
#
SYSFLAGS = -D_XOPEN_SOURCE=600 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL -DPOCO_HAVE_IPv6
#
# System Specific Libraries
#
SYSLIBS = -lpthread -ldl -lrt