-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libasterfusionbf_driver.so needs to be linked against libi2c.so too #2
Comments
Please sync your local repo from remote and build bsp via cmake to see whether the issue resolved. I have checked building and running on Debian 11 it works fine. |
hi, cmake fails out with the below message.... please note that it's a default debian 11 with bf-sde-9.13.3 and the bsp installed to my home.... ps: the ./autogen.sh ; ./configure --prefix=$SDE_INSTALL --enable-thrift ; make ; make install method also fails now when it tries to link the cp2112_utils and uart_utils.... thanks, mc36@core:~/bf-bsp-lts/build$ cmake ../
near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first -- Supported -DOS_NAME=(Debian|Ubuntu) Could not find a package configuration file provided by "Thrift" with any
Add the installation prefix of "Thrift" to CMAKE_PREFIX_PATH or set -- Configuring incomplete, errors occurred! mc36@core: mc36@core: |
Please try belowing that is told by README.md<http://README.md>
***@***.***<http://localhost>:~/bf-bsp-lts# ./autogen.sh<http://autogen.sh>
***@***.***<http://localhost>:~/bf-bsp-lts# mkdir build && cd build/
***@***.***<http://localhost>:~/bf-bsp-lts/build# cmake .. \
-DCMAKE_MODULE_PATH=`pwd`/../cmake \
-DCMAKE_INSTALL_PREFIX=$SDE_INSTALL \
-DOS_NAME=Debian \
-DOS_VERSION=11 \
-DSDE_VERSION=9133
***@***.***<http://localhost>:~/bf-bsp-lts/build# make -j15 install
… From: ***@***.***>
Date: Sat, Jun 8, 2024, 01:46
Subject: Re: [asterfusion/bf-bsp-lts] libasterfusionbf_driver.so<http://libasterfusionbf_driver.so> needs to be linked against libi2c.so<http://libi2c.so> too (Issue #2)
To: ***@***.***>
Cc: "Hang ***@***.***>, ***@***.***>
hi,
cmake fails out with the below message....
please note that it's a default debian 11 with bf-sde-9.13.3 and the bsp installed to my home....
ps:
the ./autogen.sh<http://autogen.sh> ; ./configure --prefix=$SDE_INSTALL --enable-thrift ; make ; make install
method also fails now when it tries to link the cp2112_utils....
thanks,
***@***.***:~/bf-bsp-lts/build$ cmake ../
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Supported -DOS_NAME=(Debian|Ubuntu)
-- Supported -DOS_VERSION=[(8|9|10|11|12),(14.04|16.04|18.04|20.04|22.04)]
-- Supported -DSDE_VERSION=(900|911|933|954|975|991|9112|9133)
-- core
-- SDE >= 9.9.0
-- Giving -DOS_NAME=Debian
-- Giving -DOS_VERSION=9
-- Giving -DSDE_VERSION=9130
-- Linking target_utils target_sys
CMake Error at CMakeLists.txt:114 (find_package):
By not providing "FindThrift.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Thrift", but
CMake did not find one.
Could not find a package configuration file provided by "Thrift" with any
of the following names:
ThriftConfig.cmake
thrift-config.cmake
Add the installation prefix of "Thrift" to CMAKE_PREFIX_PATH or set
"Thrift_DIR" to a directory containing one of the above files. If "Thrift"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/home/mc36/bf-bsp-lts/build/CMakeFiles/CMakeOutput.log".
***@***.***:~/bf-bsp-lts/build$
***@***.***:$ ls
access-bmc.sh<http://access-bmc.sh> asic.yaml c.sh<http://c.sh> lr.sh<http://lr.sh> port_map.json sai.yam
access-cpu.sh<http://access-cpu.sh> bf-bsp-lts lf.sh<http://lf.sh> model_20240524_133829.log rare sw.sh<http://sw.sh>
access-dpu1.sh<http://access-dpu1.sh> bf_drivers.log libcgos.so<http://libcgos.so> nct6779d reimage.sh<http://reimage.sh> update.sh<http://update.sh>
access-dpu2.sh<http://access-dpu2.sh> bf-sde-9.13.3 lp.sh<http://lp.sh> platform.conf rtr zlog-cfg-cur
***@***.***:$
***@***.***:/bf-bsp-lts$ make
make all-recursive
make[1]: Entering directory '/home/mc36/bf-bsp-lts'
Making all in platforms
make[2]: Entering directory '/home/mc36/bf-bsp-lts/platforms'
Making all in include
make[3]: Entering directory '/home/mc36/bf-bsp-lts/platforms/include'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/include'
Making all in asterfusion-bf
make[3]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf'
Making all in thrift
make[4]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/thrift'
make all-am
make[5]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/thrift'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/thrift'
make[4]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/thrift'
Making all in include
make[4]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/include'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/include'
Making all in src
make[4]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/src'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/src'
Making all in cp2112_util
make[4]: Entering directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util'
CCLD cp2112_util
/usr/bin/ld: ../src/bf_pltfm_master_i2c/cp2112_util-bf_pltfm_master_i2c.o: in function bf_pltfm_master_i2c_read_byte': /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:712: undefined reference to i2c_smbus_read_byte_data'
/usr/bin/ld: ../src/bf_pltfm_master_i2c/cp2112_util-bf_pltfm_master_i2c.o: in function bf_pltfm_master_i2c_read_block': /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:766: undefined reference to i2c_smbus_read_byte_data'
/usr/bin/ld: ../src/bf_pltfm_master_i2c/cp2112_util-bf_pltfm_master_i2c.o: in function bf_pltfm_master_i2c_write_byte': /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:865: undefined reference to i2c_smbus_write_byte_data'
/usr/bin/ld: ../src/bf_pltfm_master_i2c/cp2112_util-bf_pltfm_master_i2c.o: in function bf_pltfm_master_i2c_write_block': /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:916: undefined reference to i2c_smbus_write_byte_data'
/usr/bin/ld: ../src/bf_pltfm_master_i2c/cp2112_util-bf_pltfm_master_i2c.o: in function bf_pltfm_bmc_write_read': /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:993: undefined reference to i2c_smbus_read_block_data'
/usr/bin/ld: /home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util/../src/bf_pltfm_master_i2c/bf_pltfm_master_i2c.c:975: undefined reference to `i2c_smbus_write_block_data'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:504: cp2112_util] Error 1
make[4]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf/cp2112_util'
make[3]: *** [Makefile:380: all-recursive] Error 1
make[3]: Leaving directory '/home/mc36/bf-bsp-lts/platforms/asterfusion-bf'
make[2]: *** [Makefile:376: all-recursive] Error 1
make[2]: Leaving directory '/home/mc36/bf-bsp-lts/platforms'
make[1]: *** [Makefile:615: all-recursive] Error 1
make[1]: Leaving directory '/home/mc36/bf-bsp-lts'
make: *** [Makefile:440: all] Error 2
***@***.***:/bf-bsp-lts$
—
Reply to this email directly, view it on GitHub<#2 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBK7WQ3FNTO32PQFCHZIXETZGHWWXAVCNFSM6AAAAABIIDA2QKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGI3DKOJYHA>.
You are receiving this because you commented.[image: https://github.com/notifications/beacon/BBK7WQ5Y2KWHXUTWEBARCDTZGHWWXA5CNFSM6AAAAABIIDA2QKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUAO274I.gif]Message ID: ***@***.***>
|
hi, ohhh, an updated readme... nicee! :) anyway -li2c seems still to be missing during the linking phase... thanks, mc36@core:~/bf-bsp-lts$ ./autogen.sh mc36@core:~/bf-bsp-lts/build$ cmake .. -DCMAKE_MODULE_PATH=
near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first -- The C compiler identification is GNU 10.2.1 -- Found THRIFT: /usr/lib/x86_64-linux-gnu/libthrift.so |
Please try bf-bsp-lts/tags/24.06 |
hi, after a fresh clone of the repo, the build now succeeds however starting the bf-sde exits with the i2c symbol lookup error... br, cs mc36@core:~/bf-bsp-lts/build$ cmake .. -DCMAKE_MODULE_PATH=
near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first -- The C compiler identification is GNU 10.2.1 -- Found THRIFT: /usr/lib/x86_64-linux-gnu/libthrift.so BSP ver : Git: r49 24.06 built: 16:49:40 UTC 2024-06-25 System Preview Loading /etc/platform.conf ... Initializing i2c ... i2c-3 Initializing uart ... Skip ... Reading EEPROM ... |
after a bit of playing, i was able to bring it up with the cmake method.... mc36@core:~$ diff old/CMakeLists.txt bf-bsp-lts/CMakeLists.txt
|
libi2c.so needs to be dynamically linked against libasterfusionbf_driver.so
manually adding "-li2c" to ibasterfusionbf_driver_la_CFLAGS in platforms/asterfusion-bf/src/Makefile
please find the logs below...
all the best!
cs
mc36@core:~$ ./sw.sh
256
insmod: ERROR: could not insert module /home/mc36/nct6779d/nct6779d.ko: File exists
insmod: ERROR: could not load module /home/mc36/bf-sde-9.13.3/build/pkgsrc/bf-drivers/kdrv/bf_kpkt/bf_kpkt.ko: No such file or directory
i2c-3 smbus sio_smbus SMBus adapter
i2c-1 smbus SMBus I801 adapter at 3000 SMBus adapter
i2c-2 i2c CP2112 SMBus Bridge on hidraw0 I2C adapter
i2c-0 smbus SMBus iSMT adapter at 887d6000 SMBus adapter
insmod: ERROR: could not load module /home/mc36/bf-sde-9.13.3/install/lib/modules/bf_kpkt.ko: No such file or directory
Using SDE /home/mc36/bf-sde-9.13.3
Using SDE_INSTALL /home/mc36/bf-sde-9.13.3/install
Setting up DMA Memory Pool
Using TARGET_CONFIG_FILE /home/mc36/bf-sde-9.13.3/install/share/p4/targets/tofino/bf_router.conf
Using SDE_DEPENDENCIES /home/mc36/bf-sde-9.13.3/install
Using PATH /home/mc36/bf-sde-9.13.3/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Using LD_LIBRARY_PATH /home/mc36/bf-sde-9.13.3/install/lib:/home/mc36/bf-sde-9.13.3/install/lib::/usr/local/lib
2024-05-24 14:09:19.435254 BF_SWITCHD DEBUG - bf_switchd: system services initialized
2024-05-24 14:09:19.435326 BF_SWITCHD DEBUG - bf_switchd: loading conf_file /home/mc36/bf-sde-9.13.3/install/share/p4/targets/tofino/bf_router.conf...
2024-05-24 14:09:19.435374 BF_SWITCHD DEBUG - bf_switchd: processing device configuration...
2024-05-24 14:09:19.435451 BF_SWITCHD DEBUG - Configuration for dev_id 0
2024-05-24 14:09:19.435477 BF_SWITCHD DEBUG - Family : tofino
2024-05-24 14:09:19.435499 BF_SWITCHD DEBUG - pci_sysfs_str : /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0
2024-05-24 14:09:19.435519 BF_SWITCHD DEBUG - pci_int_mode : 0
2024-05-24 14:09:19.435540 BF_SWITCHD DEBUG - sds_fw_path : share/tofino_sds_fw/avago/firmware
2024-05-24 14:09:19.435560 BF_SWITCHD DEBUG - bf_switchd: processing P4 configuration...
2024-05-24 14:09:19.435623 BF_SWITCHD DEBUG - coal_mirror_enable=0 coal_min=0 sessions_num=0
2024-05-24 14:09:19.435652 BF_SWITCHD DEBUG - P4 profile for dev_id 0
2024-05-24 14:09:19.435673 BF_SWITCHD DEBUG - num P4 programs 1
2024-05-24 14:09:19.435694 BF_SWITCHD DEBUG - p4_name: bf_router
2024-05-24 14:09:19.435715 BF_SWITCHD DEBUG - p4_pipeline_name: pipe
2024-05-24 14:09:19.435735 BF_SWITCHD DEBUG - libpd:
2024-05-24 14:09:19.435754 BF_SWITCHD DEBUG - libpdthrift:
2024-05-24 14:09:19.435774 BF_SWITCHD DEBUG - context: /home/mc36/bf-sde-9.13.3/install/bf_router.tofino/pipe/context.json
2024-05-24 14:09:19.435828 BF_SWITCHD DEBUG - config: /home/mc36/bf-sde-9.13.3/install/bf_router.tofino/pipe/tofino.bin
2024-05-24 14:09:19.435849 BF_SWITCHD DEBUG - Pipes in scope [
2024-05-24 14:09:19.435868 BF_SWITCHD DEBUG - 0
2024-05-24 14:09:19.435888 BF_SWITCHD DEBUG - 1
2024-05-24 14:09:19.435909 BF_SWITCHD DEBUG - 2
2024-05-24 14:09:19.435929 BF_SWITCHD DEBUG - 3
2024-05-24 14:09:19.435950 BF_SWITCHD DEBUG - ]
2024-05-24 14:09:19.435971 BF_SWITCHD DEBUG - diag:
2024-05-24 14:09:19.435990 BF_SWITCHD DEBUG - accton diag:
2024-05-24 14:09:19.436011 BF_SWITCHD DEBUG - Agent[0]: /home/mc36/bf-sde-9.13.3/install/lib/libpltfm_mgr.so
2024-05-24 14:09:19.439950 BF_SWITCHD DEBUG - bf_switchd: library /home/mc36/bf-sde-9.13.3/install/lib/libpltfm_mgr.so loaded
2024-05-24 14:09:19.441429 BF_SWITCHD DEBUG - bf_switchd: agent[0] initialized
BSP ver : Git: r78 24.02-rc1-33-gc2dd6cf-dev built: 19:05:37 UTC 2024-05-24
System Preview
Login User: mc36
Runtime User: root
Host: core
Arch: x86_64
Bits/LONG: 64
Platform: Linux
Kernel: 5.10.0-29-amd64
OS: #1 SMP Debian 5.10.216-1 (2024-05-03)
CPU: 4
Loading /etc/platform.conf ...
Initializing i2c ... i2c-3
Initializing uart ... Skip ...
Reading EEPROM ...
bf_switchd: symbol lookup error: /home/mc36/bf-sde-9.13.3/install/lib/libasterfusionbf_driver.so.0: undefined symbol: i2c_smbus_write_block_data
The text was updated successfully, but these errors were encountered: