Closed bluecmd closed 6 years ago
[durh -- ignore my first comment] Hi,
Thanks for the interest. FBOSS can in theory compile against a fedora based distribution, but no one has tried it before. It's not surprising that there would be some minor header incompatibilities - thanks for pointing this one out. As hopefully you can see from the build instructions and the travis builds, this builds cleanly as is for ubuntu and Debian systems.
If you want to submit a patch for this or any other fedora compatibility tweaks, that would be much appreciated.
Yes, I kind of figured that Fedora was a bit of a stretch (pun intended) ;-).
FWIW, I tested on my Debian machine which is "testing/buster", and it appears that these functions are defined in the above file even here (after running getdeps.sh
).
bluecmd@x:~/fboss$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux testing (buster)
Release: testing
Codename: buster
bluecmd@x:~/fboss$ grep i2c_smbus_read_i2c_block_data -R /usr/include/
/usr/include/i2c/smbus.h:extern __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command, __u8 length,
bluecmd@x:/usr/include$ grep smbus.h -R .
./i2c/smbus.h: smbus.h - SMBus level access helper functions
bluecmd@x:~/fboss$ grep smbus.h -R .
I'll see if I can find a Ubuntu 16.04 machine to test on as well, but it seems weird that the "linux/i2c-dev" which I guess is a kernel API would in some distros contain userspace library functions (libi2c-dev). Maybe libi2c-dev was spun out after Ubuntu 16.04?
Probably the easiest thing to do is download Open Network Linux and use the docker based build environment that's included with it. If you look at the build steps used in the .travis.yml build script, it should give you a feel for how to do this.
I ended up doing just that, and it worked. Weird, but at least the workaround is here if it's needed in the future.
Hi,
I'm attempting to compile fboss. I'm using Fedora 28.
I fixed this locally by installing libi2c-devel and patching like this:
I'm a bit confused why nobody seem to have reported this over the years, maybe it works differently on non-Fedora platforms.