Mention Tofino model source in README.md#125
Mention Tofino model source in README.md#125jafingerhut wants to merge 21 commits intop4lang:mainfrom
Conversation
Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
Also that build of everything (at least bf-drivers) requires a system with x86_64 processor. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
|
|
||
| # Setup | ||
|
|
||
| Note: At least the bf-drivers component of this software depends upon |
There was a problem hiding this comment.
What binary is this concretely?
There was a problem hiding this comment.
These are all .a and .so files that are in the latest version of the open-p4studio repo:
$ find . -name '*.a' -o -name '*.so'
./p4studio/third_party/_yaml.cpython-35m-x86_64-linux-gnu.so
./pkgsrc/target-utils/third-party/tommyds/benchmark/lib/judy/libJudyL.a
./pkgsrc/target-utils/third-party/tommyds/benchmark/lib/judy/libJudyMalloc.a
./pkgsrc/bf-drivers/src/port_mgr/port_mgr_lib/libport_mgr_hw.so
./pkgsrc/bf-drivers/src/port_mgr/port_mgr_lib/libport_mgr_hw.a
$ find . -name '*.a' -o -name '*.so' | xargs file
./p4studio/third_party/_yaml.cpython-35m-x86_64-linux-gnu.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5b67f5cf630d08c2490517119c45570ae76fb012, with debug_info, not stripped
./pkgsrc/target-utils/third-party/tommyds/benchmark/lib/judy/libJudyL.a: current ar archive
./pkgsrc/target-utils/third-party/tommyds/benchmark/lib/judy/libJudyMalloc.a: current ar archive
./pkgsrc/bf-drivers/src/port_mgr/port_mgr_lib/libport_mgr_hw.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3e3b4411c3dd9dcc344f410564fa6d75ddf347e6, not stripped
./pkgsrc/bf-drivers/src/port_mgr/port_mgr_lib/libport_mgr_hw.a: current ar archive
At least the two files libport_mgr_hw.* are mentioned explicitly in CMakeLists.txt files, and the relevant build commands fail when attempting to install open-p4studio on an aarch64 system, and likely also anything but an x86_64 system:
$ find . \! -type d | xargs grep libport_mgr_hw
./pkgsrc/bf-drivers/src/port_mgr/CMakeLists.txt: ${CMAKE_CURRENT_SOURCE_DIR}/port_mgr_lib/libport_mgr_hw.a
./pkgsrc/bf-drivers/src/port_mgr/CMakeLists.txt: ${CMAKE_CURRENT_SOURCE_DIR}/port_mgr_lib/libport_mgr_hw.so
./pkgsrc/bf-drivers/bf_switchd/CMakeLists.txt:find_program(MY_PROGRAM libport_mgr_hw.a
The output of ar t libport_mgr_hw.a lists many things that look like C or C++ source file names, most of which have no file with those names in the open-p4studio repo.
There was a problem hiding this comment.
I cannot quickly find the conversation on an issue or PR at the moment, but @vgurevich was involved in the past 6 months or so where IIRC he was helping someone try to compile code from this repo for use on a real hardware system with Tofino ASICs, and Vladimir was surprised to find that these binaries were in this repo, but it did seem to enable some additional use cases for this repo's soruce code that he previously thought were not possible.
There was a problem hiding this comment.
The libJudy sources should be available from https://judy.sourceforge.net/ at least
There was a problem hiding this comment.
Attached is the output of attempting to use the command ./p4studio/p4studio profile apply ./p4studio/profiles/testing.yaml mentioned in the README of this repo for installing it, on an Ubuntu 24.04 Linux VM running on an Apple Silicon Mac (aarch64 processor architecture) host. Near the end you can see these errors:
[ 25%] Linking CXX shared library /home/p4/open-p4studio/install/lib/libdriver.so
/usr/bin/ld: /home/p4/open-p4studio/install/lib/libport_mgr_hw.a(port_mgr_tof3_dev.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/p4/open-p4studio/install/lib/libport_mgr_hw.a(port_mgr_tof3_dev.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/p4/open-p4studio/install/lib/libport_mgr_hw.a(port_mgr_tof3_dev.c.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: /home/p4/open-p4studio/install/lib/libport_mgr_hw.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
There was a problem hiding this comment.
FYI, I am NOT proposing that we try to change things so that this code can be built on systems with non-x86_64 processors. I simply think it might help others save some time if they know that this is a property of the current code base.
No description provided.