Skip to content

update CFLAGS and LDFLAGS to support raspbian #46

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

happydig
Copy link

modify cgoflags.go to support raspbian. cgo pkg-config: hdf5 solution does not work with homebrew and ubuntu trusty, though it works on raspbian stretch and ubuntu 18.10.

@@ -7,7 +7,9 @@ package hdf5
// #cgo LDFLAGS: -lhdf5 -lhdf5_hl
// #cgo darwin CFLAGS: -I/usr/local/include
// #cgo darwin LDFLAGS: -L/usr/local/lib
// #cgo linux CFLAGS: -I/usr/local/include, -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include
// #cgo linux LDFLAGS: -L/usr/local/lib, -L/usr/lib/x86_64-linux-gnu/hdf5/serial/
// #cgo linux !arm CFLAGS: -I/usr/local/include, -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps s/!arm/amd64/ instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see #42 (comment)

@kortschak
Copy link
Member

I will be able to test this in a couple of days.

@kortschak
Copy link
Member

Apologies for the long delay in getting to this. I think we have too many assumptions about word sizes for this to work as it stands. When I run the tests, we have a fair amount of breakage.

$ GODEBUG=cgocheck=0 go test ./...
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 3063237360:
  #000: ../../../src/H5S.c line 1459 in H5Screate_simple(): maxdims is smaller than dims
    major: Invalid arguments to routine
    minor: Bad value
--- FAIL: TestReadSubset (0.01s)
    h5d_dataset_test.go:96: failed to create dataspace
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) thread 3063237360:
  #000: ../../../src/H5Shyper.c line 6906 in H5Sselect_hyperslab(): unable to set hyperslab selection
    major: Dataspace
    minor: Unable to initialize object
  #001: ../../../src/H5Shyper.c line 6559 in H5S_select_hyperslab(): hyperslab blocks overlap
    major: Invalid arguments to routine
    minor: Bad value
--- FAIL: TestSelectHyperslab (0.00s)
    h5d_dataset_test.go:189: code -1
--- FAIL: TestSimpleDataspace (0.00s)
    h5s_dataspace_test.go:54: failed to create dataspace
--- FAIL: TestArrayDatatype (0.00s)
    h5t_types_test.go:89: code -1
--- FAIL: TestStructDatatype (0.00s)
    h5t_types_test.go:173: wrong offset: got 8, want 12
    h5t_types_test.go:173: wrong offset: got 8, want 12
FAIL
FAIL	gonum.org/v1/hdf5	0.680s
--- FAIL: TestCpxCmpd (0.00s)
    main_test.go:24: error: exec: "test-go-cpxcmpd": executable file not found in $PATH
        
FAIL
FAIL	gonum.org/v1/hdf5/cmd/test-go-cpxcmpd	0.058s
?   	gonum.org/v1/hdf5/cmd/test-go-extend-ds	[no test files]
?   	gonum.org/v1/hdf5/cmd/test-go-hdf5	[no test files]
--- FAIL: TestTableRWCmd (0.00s)
    main_test.go:25: error: exec: "test-go-table-01": executable file not found in $PATH
        
FAIL
FAIL	gonum.org/v1/hdf5/cmd/test-go-table-01	0.057s
?   	gonum.org/v1/hdf5/cmd/test-go-table-01-readback	[no test files]
--- FAIL: TestEncode (0.00s)
    --- FAIL: TestEncode/0 (0.00s)
        encoder_test.go:52: encoding error:
            got = [1 0 0 0 2 0 0 0 0 0 0 0 3 0 4 0]
            want= [1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 3 0 4 0]
FAIL
FAIL	gonum.org/v1/hdf5/cmem	0.024s

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants