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

Go Jsonnet library and _Complex #239

Closed
brettviren opened this issue Aug 23, 2023 · 1 comment
Closed

Go Jsonnet library and _Complex #239

brettviren opened this issue Aug 23, 2023 · 1 comment
Assignees

Comments

@brettviren
Copy link
Member

Lynn Garren found compiling ubsim against WCT with Clang (c14) gives

In file included from /home/garren/scratch/larsoft/uboone/dev5/srcs/ubsim/ubsim/DetSim/MicroBooNEWireCell/ReweightedDepoTransform.cxx:17:
In file included from /cvmfs/larsoft.opensciencegrid.org/products/wirecell/v0_24_1b/Linux64bit+3.10-2.17-c14-prof/include/WireCellUtil/Persist.h:31:
cgo-gcc-export-header-prolog:23:15: error: '_Complex' is a C99 extension [-Werror,-Wc99-extensions]
typedef float _Complex GoComplex64;
              ^
cgo-gcc-export-header-prolog:24:16: error: '_Complex' is a C99 extension [-Werror,-Wc99-extensions]
typedef double _Complex GoComplex128;

The problem is actually inside the C API to the Go library providing the Jsonnet parser and is a little dump because the API does not use the offending types.

Besides pushing this upstream, it should be possible to fix by simply removing the include "libjsonnet.h" entirely from Persist.h and in Persist.cxx add declaration of the subset of the API we actually use.

@brettviren brettviren self-assigned this Aug 23, 2023
@brettviren
Copy link
Member Author

Lynn reports that compiler flags are not enough to dodge this error so we should fast track.

We should back port this to 0.24.x in addition to making a 0.25.1

brettviren added a commit that referenced this issue Aug 23, 2023
Perhaps.  I could not reproduce the problem.  This explicitly declares the Jsonnet API functions instead of including the header that is causing FNAL problems
brettviren added a commit that referenced this issue Aug 23, 2023
Perhaps.  I could not reproduce the problem.  This explicitly declares the Jsonnet API functions instead of including the header that is causing FNAL problems
HaiwangYu added a commit that referenced this issue Aug 24, 2023
Fix #239 by explicitly declaring Jsonnet API functions used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant