libedgetpu icon indicating copy to clipboard operation
libedgetpu copied to clipboard

Makefile is not compatible with tf 2.16.1

Open mwprado opened this issue 1 year ago • 6 comments

If you try compile using make, shows there isn't common.c file. In Tf 2.16.1 there is only common.cc .

mwprado avatar Aug 16 '24 00:08 mwprado

Are you satisfied with the resolution of your issue? Yes No

google-coral-bot[bot] avatar Aug 16 '24 00:08 google-coral-bot[bot]

got the same issue here.

FeeJai avatar Sep 05 '24 16:09 FeeJai

got the same issue here.

I fixed makefile:

new_makefile.patch.txt

mwprado avatar Sep 18 '24 01:09 mwprado

@feranick common_internal.cc needs be relocated to LIBEDGETPU_CCSRCS variable as my patch set it.

mwprado avatar Sep 18 '24 23:09 mwprado

@feranick without the patch provided by @mwprado it won't compile, even with the newest commit of the main branch.

Additionally, it is important to mention, that the documentation is misleading (not to say wrong) in respect to the build dependencies: On ubuntu / debian systems the provided package for libflatbuffers-dev uses a different scheme for version numbers. The current versions are v2.0.8 (debian bookworm / ubuntu 24.04), but tensorflow requests v23.x.y. So builds will never work, eventhough the documention suggests, it would.

It would be great to change the documentation and add instructions to build and install the matching flatbuffer version which tensorflow requires.

Please add to makefile_build documentation

For example for tensorflow 2.16.1 you require to build and install libflatbuffers 23.5.26:

git clone https://github.com/google/flatbuffers.git
cd flatbuffers/
git checkout v23.5.26
mkdir build && cd build
cmake .. -DFLATBUFFERS_BUILD_SHAREDLIB=ON -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make -j$(nproc)
sudo make install

Please add to main documentation

And in order to make debian packages using the Makefile-only approach you need to build both versions of the library first (std, max) before the packaging routine can successfully been run:

TFROOT=<Directory of Tensorflow>/ make -f makefile_build/Makefile -j$(nproc)
debuild -us -uc -tc -b -a amd64 -d

jagiella avatar Sep 30 '24 15:09 jagiella

@jagiella I am not sure why you are tagging me on this. I am not a Google developer and have no access to the main repo. Feel free to create an actual patch, make a PR against the main repo and hope that it gets merged.

I maintain a separate fork that is updated: https://github.com/feranick/libedgetpu/

with a PR to the main repo: https://github.com/google-coral/libedgetpu/pull/70

feranick avatar Sep 30 '24 15:09 feranick