cpplot icon indicating copy to clipboard operation
cpplot copied to clipboard

Add workaround to issue in conan's GLOG build/link process for windows

Open ShamanTcler opened this issue 4 years ago • 3 comments

[==========] 14 tests from 1 test suite ran. (98439 ms total) [ PASSED ] 14 tests.

This was built with Win 10 MSVS 2015.

The current issue is with GLOG this is the bug report: https://github.com/conan-io/conan-center-index/issues/2494

I stubbed in "Spacelm" suggestion of:

#ifdef _WIN32 #ifndef MINGW32 #define GOOGLE_GLOG_DLL_DECL #endif #endif

( don't you just love those little magic incantations .... sigh)

before every glog include ... and she built.

My suggestion is make no changes just wait for that bug fix and rebuild.

Thanks and regards Carl

ShamanTcler avatar Aug 12 '20 14:08 ShamanTcler

Thanks for all your work, @ShamanTcler / Carl!

(I'm Tom, by the way ;) !).

The current issue is with GLOG this is the bug report: conan-io/conan-center-index#2494

I stubbed in "Spacelm" suggestion of:

#ifdef _WIN32 #ifndef MINGW32 #define GOOGLE_GLOG_DLL_DECL #endif #endif

Is this something you've subbed into the cpplot codebase? Or into somewhere else?

thclark avatar Aug 12 '20 14:08 thclark

To get mine to work I edited my local copies .... i.e.

cpplot_test.cpp now has this snippet:

#include "eigen.h"
#include "exceptions.h"
#include "gtest/gtest.h"
#ifdef _WIN32
#ifndef __MINGW32__
#define GOOGLE_GLOG_DLL_DECL 
#endif
#endif
#include "glog/logging.h"

I would not make these changes to the code.

Let them fix Conan's GLOG and things should work fine. Just curious was the test code supposed to echo tons of data to the screen?

here is the output of the test app:

-rwx------+ 1 210008258 Domain Users      399 Aug 12 10:30 test_3d_axes_labels.json
-rwx------+ 1 210008258 Domain Users      196 Aug 12 10:29 test_bar_and_scatter_plot.json
-rwx------+ 1 210008258 Domain Users      153 Aug 12 10:29 test_bar_plot.json
-rwx------+ 1 210008258 Domain Users      225 Aug 12 10:30 test_latex_labels.json
-rwx------+ 1 210008258 Domain Users      172 Aug 12 10:30 test_layout_no_title_plot.json
-rwx------+ 1 210008258 Domain Users      194 Aug 12 10:30 test_layout_plot.json
-rwx------+ 1 210008258 Domain Users     3381 Aug 12 10:30 test_log_axes.json
-rwx------+ 1 210008258 Domain Users 14094026 Aug 12 10:29 test_mandelbrot_plot.json
-rwx------+ 1 210008258 Domain Users      124 Aug 12 10:29 test_scatter_plot.json
-rwx------+ 1 210008258 Domain Users      216 Aug 12 10:29 test_scatter_with_legend_plot.json
-rwx------+ 1 210008258 Domain Users      294 Aug 12 10:29 test_surface_plot.json
-rwx------+ 1 210008258 Domain Users      175 Aug 12 10:29 test_wide_coloured_dashed_scatter_plot.json
-rwx------+ 1 210008258 Domain Users     1919 Aug 12 10:30 test_wolfgang.json

My intent is to build this with MSVS 2015/2017/2019 so it should get exercised.

ShamanTcler avatar Aug 12 '20 15:08 ShamanTcler

I would not make these changes to the code.

Why not? I can make the fix, and add a TODO to clear it up once conan's glog is fixed (unlikely to be any time soon).

Just curious was the test code supposed to echo tons of data to the screen?

I can't remember, but probably, as I was nervously printing everything I could get my hands on. I'll consider suppressing the output during test.

thclark avatar Aug 12 '20 16:08 thclark