[ 
https://issues.apache.org/jira/browse/ARROW-2313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400110#comment-16400110
 ] 

ASF GitHub Bot commented on ARROW-2313:
---------------------------------------

xhochy closed pull request #1752: ARROW-2313: [C++] Add -NDEBUG flag to arrow.pc
URL: https://github.com/apache/arrow/pull/1752
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake 
b/cpp/cmake_modules/SetupCxxFlags.cmake
index e21c549d9..28d903f3d 100644
--- a/cpp/cmake_modules/SetupCxxFlags.cmake
+++ b/cpp/cmake_modules/SetupCxxFlags.cmake
@@ -236,4 +236,10 @@ else()
   message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}")
 endif ()
 
+if ("${CMAKE_CXX_FLAGS}" MATCHES "-DNDEBUG")
+  set(ARROW_DEFINITION_FLAGS "-DNDEBUG")
+else()
+  set(ARROW_DEFINITION_FLAGS "")
+endif()
+
 message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
diff --git a/cpp/src/arrow/arrow.pc.in b/cpp/src/arrow/arrow.pc.in
index fc16267c7..cae815a00 100644
--- a/cpp/src/arrow/arrow.pc.in
+++ b/cpp/src/arrow/arrow.pc.in
@@ -25,4 +25,4 @@ Name: Apache Arrow
 Description: Arrow is a set of technologies that enable big-data systems to 
process and move data fast.
 Version: @ARROW_VERSION@
 Libs: -L${libdir} -larrow
-Cflags: -I${includedir}
+Cflags: -I${includedir} @ARROW_DEFINITION_FLAGS@


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [GLib] Release builds must define NDEBUG
> ----------------------------------------
>
>                 Key: ARROW-2313
>                 URL: https://issues.apache.org/jira/browse/ARROW-2313
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: GLib
>            Reporter: Wes McKinney
>            Assignee: Kouhei Sutou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> Ran into another problem with {{verify-release-candidate.sh 0.9.0 0}} -- the 
> GLib build is not defining NDEBUG -- depending on whether Arrow was built in 
> release or debug mode, some symbols (like {{Buffer::mutable_data}}) may not 
> be inlined
> {code}
>   CXX      libarrow_glib_la-compute.lo
>   CC       enums.lo
>   CXXLD    libarrow-glib.la
> ar: `u' modifier ignored since `D' is the default (see `U')
>   GISCAN   Arrow-1.0.gir
> ./.libs/libarrow-glib.so: undefined reference to 
> `arrow::Buffer::mutable_data()'
> collect2: error: ld returned 1 exit status
> linking of temporary binary failed: Command '['/bin/bash', '../libtool', 
> '--mode=link', '--tag=CC', '--silent', 'gcc', '-o', 
> '/tmp/arrow-0.9.0.hlQDV/apache-arrow-0.9.0/c_glib/arrow-glib/tmp-introspect7g38ad/Arrow-1.0',
>  '-export-dynamic', '-g', '-O2', 
> 'tmp-introspect7g38ad/tmp/arrow-0.9.0.hlQDV/apache-arrow-0.9.0/c_glib/arrow-glib/tmp-introspect7g38ad/Arrow-1.0.o',
>  '-L.', 'libarrow-glib.la', '-Wl,--export-dynamic', '-lgmodule-2.0', 
> '-pthread', '-lgio-2.0', '-lgobject-2.0', '-lglib-2.0']' returned non-zero 
> exit status 1
> /usr/share/gobject-introspection-1.0/Makefile.introspection:155: recipe for 
> target 'Arrow-1.0.gir' failed
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to