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

v0.6.0: symbolize unit test fails again in Release mode #870

Closed
jstiefel opened this issue Nov 7, 2022 · 5 comments
Closed

v0.6.0: symbolize unit test fails again in Release mode #870

jstiefel opened this issue Nov 7, 2022 · 5 comments

Comments

@jstiefel
Copy link

jstiefel commented Nov 7, 2022

When building and testing glog v0.6.0 in Release mode, the unit test of symbolize fails. If I build and test in Debug mode, it succeeds. This was previously mentioned in this issue #435 and was fixed in v0.5.0. I also tried it in v0.5.0 and there, it succeeds in both Release and Debug mode.

Built with Ubuntu 20.04.5, g++-9.

@sergiud
Copy link
Collaborator

sergiud commented Nov 7, 2022

Our CI runs tests both in debug and release mode and does not exhibit the described problem. The failure is likely specific to your setup and therefore we need a full reproducer.

@jstiefel
Copy link
Author

jstiefel commented Nov 7, 2022

I'm running it in a basic VSCode Devcontainer:

devcontainer.json:

{
	"name": "Ubuntu",
	"image": "ubuntu:20.04",

	"settings": {
		"terminal.integrated.defaultProfile.linux": "bash"
	},
        "postCreateCommand": "apt-get update && apt-get -y install git build-essential cmake",
        "customizations": {
               "vscode": {
                     "extensions": ["ms-vscode.cmake-tools", "ms-vscode.cpptools-themes", "ms-vscode.cpptools-extension-pack", "twxs.cmake", "ms-vscode.cpptools", "cschlosser.doxdocgen"]
        }
    }
}

and CMakeLists.txt:

cmake_minimum_required(VERSION 3.16)

project(test_proj VERSION 0.0.1 LANGUAGES CXX)

option(WITH_GFLAGS OFF)
option(BUILD_SHARED_LIBS OFF) # for GLOG
set(CMAKE_BUILD_TYPE Release)

include(FetchContent)

FetchContent_Declare(
  googletest
  GIT_REPOSITORY https://github.com/google/googletest.git
  GIT_TAG        release-1.11.0
)

FetchContent_Declare(
  glog
  GIT_REPOSITORY https://github.com/google/glog
  GIT_TAG        v0.6.0   
)

FetchContent_MakeAvailable(glog)
FetchContent_MakeAvailable(googletest)

enable_testing()
include(GoogleTest)

@sergiud
Copy link
Collaborator

sergiud commented Nov 7, 2022

Thanks. This issue is duplicate of #630.

@sergiud sergiud closed this as completed Nov 7, 2022
@jstiefel
Copy link
Author

jstiefel commented Nov 7, 2022

Oh, ok. However, here I think WITH_GTEST is ON per default and the problem has to do with the Release mode compared to the linked issue. But may be the same issue in the end.

@sergiud
Copy link
Collaborator

sergiud commented Nov 7, 2022

WITH_GTEST is not the problem (see the discussion). TL;DR: either set BUILD_SHARED_LIBS=ON or WITH_TLS=OFF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants