From issues-return-103706-apmail-nifi-issues-archive=nifi.apache.org@nifi.apache.org Tue Sep 22 10:13:28 2020 Return-Path: X-Original-To: apmail-nifi-issues-archive@locus.apache.org Delivered-To: apmail-nifi-issues-archive@locus.apache.org Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with ESMTP id 5835A1A6C1 for ; Tue, 22 Sep 2020 10:13:28 +0000 (UTC) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 0912F121B89 for ; Tue, 22 Sep 2020 10:13:28 +0000 (UTC) Received: (qmail 19525 invoked by uid 500); 22 Sep 2020 10:13:27 -0000 Delivered-To: apmail-nifi-issues-archive@nifi.apache.org Received: (qmail 19495 invoked by uid 500); 22 Sep 2020 10:13:27 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 19486 invoked by uid 99); 22 Sep 2020 10:13:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2020 10:13:27 +0000 From: =?utf-8?q?GitBox?= To: issues@nifi.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bnifi-minifi-cpp=5D_fgerlits_commented_on_a_change_?= =?utf-8?q?in_pull_request_=23886=3A_MINIFICPP-1323_Encrypt_sensitive_proper?= =?utf-8?q?ties?= Message-ID: <160076960762.32230.3440456657680511385.asfpy@gitbox.apache.org> Date: Tue, 22 Sep 2020 10:13:27 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: fgerlits commented on a change in pull request #886: URL: https://github.com/apache/nifi-minifi-cpp/pull/886#discussion_r492621966 ########## File path: encrypt-config/CMakeLists.txt ########## @@ -0,0 +1,30 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +cmake_minimum_required(VERSION 3.7) +project(encrypt-config) +set(VERSION, "0.1") + +file(GLOB ENCRYPT_CONFIG_FILES "*.cpp") +add_executable(encrypt-config "${ENCRYPT_CONFIG_FILES}") +include_directories(../libminifi/include ../thirdparty/cxxopts/include) Review comment: If I change it to `target_include_directories`, I get an error message which says ``` Determining if the pthread_create exist failed with the following output: Change Dir: /home/fgerlits/src/minifi/build/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/make" "cmTC_c8414/fast" /usr/bin/make -f CMakeFiles/cmTC_c8414.dir/build.make CMakeFiles/cmTC_c8414.dir/build make[1]: Entering directory '/home/fgerlits/src/minifi/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_c8414.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_c8414.dir/CheckSymbolExists.c.o -c /home/fgerlits/src/minifi/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_c8414 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c8414.dir/link.txt --verbose=1 /usr/bin/cc -rdynamic CMakeFiles/cmTC_c8414.dir/CheckSymbolExists.c.o -o cmTC_c8414 CMakeFiles/cmTC_c8414.dir/CheckSymbolExists.c.o: In function `main': CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status CMakeFiles/cmTC_c8414.dir/build.make:97: recipe for target 'cmTC_c8414' failed make[1]: *** [cmTC_c8414] Error 1 make[1]: Leaving directory '/home/fgerlits/src/minifi/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_c8414/fast' failed make: *** [cmTC_c8414/fast] Error 2 File /home/fgerlits/src/minifi/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include int main(int argc, char** argv) { (void)argv; #ifndef pthread_create return ((int*)(&pthread_create))[argc]; #else (void)argc; return 0; #endif } ``` If I simply delete this line, then the includes are missing from the compile options. I have tried various ways of telling CMake that `encrypt-config` depends on `minifi` and `cxxopts` and should inherit their include and link flags, but none of them worked. I agree that the CMake build structure should be cleared up, but I suggest we do that separately from this pull request. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org