Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
E
evolution-data-server
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GNOME
  • evolution-data-server
  • Issues
  • #120

Closed
Open
Opened May 22, 2019 by Дилян Палаузов@dilyan.palauzovContributor

Fails to build with libasan using Clang (undefined symbols)

Utilizing the AddressSanitizer with Clang means that the binary exports some symbols and the shared libraries use those symobls at run time. Thus during linking -Wl,--no-undefined must be replaced with -Wl,-z,undefs.

  • Permit linking evolution-data-server, evolution, evolution-ews with -Wl,-z,undefs.

I am not sure whether passing -no-undefined to the compiler for linking is good. GCC passes this to the Darwin linker.

diff --git a/cmake/modules/SetupBuildFlags.cmake b/cmake/modules/SetupBuildFlags.cmake
--- a/cmake/modules/SetupBuildFlags.cmake
+++ b/cmake/modules/SetupBuildFlags.cmake
@@ -21,7 +21,6 @@ macro(setup_build_flags _maintainer_mode)
                -Wundef
                -Wwrite-strings
                -Wno-cast-function-type
-               -no-undefined
                -fno-strict-aliasing
        )
 
@@ -76,10 +75,4 @@ macro(setup_build_flags _maintainer_mode)
                        unset(cxx_flag_${flag}_supported)
                endforeach()
        endif(CMAKE_CXX_COMPILER_ID)
-
-       if(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD"))
-               set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
-               set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
-               set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
-       endif(("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "BSD" ))
 endmacro()
Edited May 22, 2019 by Дилян Палаузов
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/evolution-data-server#120