Skip to content

Conversation

@happydig
Copy link

support install on raspbian.

support install on raspbian.
@happydig happydig changed the title Update cgoflags.go Update cgoflags to support raspbian. Jan 10, 2019
// #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/arm-linux-gnueabihf/hdf5/serial/include/
// #cgo linux arm LDFLAGS: -L/usr/local/lib, -L/usr/lib/arm-linux-gnueabihf/hdf5/serial/
Copy link
Member

Choose a reason for hiding this comment

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

ok... perhaps add !arm for the other linux directives? or add amd64?

Copy link
Author

Choose a reason for hiding this comment

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

I prefer "amd64". or could we use pkg-config directive? as:

 package hdf5
// #cgo pkg-config: hdf5-serial
// #cgo LDFLAGS: -lhdf5_hl
// #include "hdf5.h"
import "C"

This passed on my laptops but failed on Travis. Travis failed ot execute 'pkg-config hdf5-serial --cflags" .

Copy link
Member

Choose a reason for hiding this comment

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

The union of build tag must be 𝑈, so please use !arm in conjunction with arm. If pkg-config works though, that would be the best.

Copy link
Author

Choose a reason for hiding this comment

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

The status is:
1, On raspbian stretch, libhdf5-dev provides hdf5.pc.
2, On Ubuntu 18.10, libhdf5-dev proides hdf5.pc.
3, On Mac OS homebrew, hdf5 does not provide hdf5.pc. It is due to hdf5 source code without hdf5.pc.
4, On Ubuntu trusty which travis-ci runs, libhdf5-dev does not provide hdf5.pc.

So I will create a pull request with '!arm' option.

Thanks a lot.

Copy link
Author

Choose a reason for hiding this comment

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

I filed pull request #46 . Please review it.

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

Successfully merging this pull request may close these issues.

3 participants