Closed mvo5 closed 2 years ago
It seems to me that ideally pkg-config --cflags smbclient would DTRT and return -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 along with -I/usr/include/samba-4.0
That is an excellent point. pkg-config
is not even a dependency of libsmbclient-dev
, though, so I wonder how many projects use it. Does the golang build system (or libsmbclient-go
) use pkg-config
?
It seems to me that ideally pkg-config --cflags smbclient would DTRT and return -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 along with -I/usr/include/samba-4.0
That is an excellent point.
pkg-config
is not even a dependency oflibsmbclient-dev
, though, so I wonder how many projects use it. Does the golang build system (orlibsmbclient-go
) usepkg-config
?
Indeed, it's not right now - there is no good reason for this though, I should fix it. golang supports pkg-config [1] so that would be a nice way out (if samba upstream adds the needed bits at least).
[1] https://pkg.go.dev/github.com/rjeczalik/pkgconfig/cmd/pkg-config
Are the tests below stalled? It's been running for 5h now
The latest debian version of libsmbclient-dev no longer sets the large file support cflags in libsmbclient.h [1]. This leads to build failures on 32bit systems.
It seems to me that ideally
pkg-config --cflags smbclient
would DTRT and return-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
along with-I/usr/include/samba-4.0
. However this is not the case.The cgo system also does not allow running arbitrary scripts so just calling
getconf LFS_CFLAGS
is not an option.This commit adds a new
libsmbclient_lfs.go
file that is only build on 386/arm and defined the needed LFS cflags.[1] https://github.com/mvo5/libsmbclient-go/issues/10