yosys: undefined symbol: ffi_type_double, version LIBFFI_BASE_7.0

Post Reply
Martoni
Posts: 18
Joined: Fri Mar 19, 2021 8:37 am

Hello,

I'm on Linux Mint distribution (Linux Mint 21 Vanessa) and I'm trying to synthesis qf_helloworldhw FPGA example for my quickfeather board with qorc-sdk tools.

I installed software development environment with sourcing envsetup.sh as describe in quickstart.rst :

Code: Select all

$ source envsetup.sh
Software C compilation and binary flashing works well but synthesis have problems when launching yosys :

Code: Select all

...
verilog files: helloworldfpga.v 
make[2] : on entre dans le répertoire « /opt/qorc-sdk/qf_apps/qf_helloworldhw/fpga/rtl »
cd build && symbiflow_synth -t helloworldfpga -v /opt/qorc-sdk/qf_apps/qf_helloworldhw/fpga/rtl/helloworldfpga.v   -d ql-eos-s3_wlcsp -p /opt/qorc-sdk/qf_apps/qf_helloworldhw/fpga/rtl/quickfeather.pcf -P PU64 2>&1 > /opt/qorc-sdk/qf_apps/qf_helloworldhw/fpga/rtl/build/helloworldfpga.log
yosys: symbol lookup error: yosys: undefined symbol: ffi_type_double, version LIBFFI_BASE_7.0
make[2]: *** [Makefile.symbiflow:20 : build/helloworldfpga.eblif] Erreur 127
...
Is it a known problem ?

If I launch Yosys alone I have the same message :

Code: Select all

$ yosys
yosys: symbol lookup error: yosys: undefined symbol: ffi_type_double, version LIBFFI_BASE_7.0
Thanks
Martoni
Posts: 18
Joined: Fri Mar 19, 2021 8:37 am

I found a workaround by deleting libffi.so.7 link in conda/lib directory :

Code: Select all

$ cd /opt/qorc-sdk/fpga_toolchain_install/v1.3.1/conda/bin/./../lib/
$ mv libffi.so.7 libffi.so.7.legacy
After that, I can launch yosys without problem :

Code: Select all

$ which yosys
/opt/qorc-sdk/fpga_toolchain_install/v1.3.1/conda/bin/yosys
$ yosys

 /----------------------------------------------------------------------------\
 |                                                                            |
 |  yosys -- Yosys Open SYnthesis Suite                                       |
 |                                                                            |
 |  Copyright (C) 2012 - 2020  Claire Wolf <claire@symbioticeda.com>          |
 |                                                                            |
 |  Permission to use, copy, modify, and/or distribute this software for any  |
 |  purpose with or without fee is hereby granted, provided that the above    |
 |  copyright notice and this permission notice appear in all copies.         |
 |                                                                            |
 |  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES  |
 |  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF          |
 |  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR   |
 |  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    |
 |  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN     |
 |  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   |
 |  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.            |
 |                                                                            |
 \----------------------------------------------------------------------------/

 Yosys 0.9+2406 (git sha1 9ac3484, x86_64-conda_cos6-linux-gnu-gcc 1.24.0.133_b0863d8_dirty -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -fdebug-prefix-map=/root/anaconda3/conda-bld/yosys_1607410735049/work=/usr/local/src/conda/yosys-0.8.0_0003_e80fb742f_20201208_122808 -fdebug-prefix-map=/opt/qorc-sdk/fpga_toolchain_install/v1.3.1/conda=/usr/local/src/conda-prefix -fPIC -Os)


yosys>
Robert
Posts: 29
Joined: Fri May 15, 2020 8:27 am

Unfortunately, this version of Symbiflow has only been tested on Ubuntu 20_04. I am glad that you have found a fix for your Linux distribution.
Martoni
Posts: 18
Joined: Fri Mar 19, 2021 8:37 am

Unfortunately, this version of Symbiflow has only been tested on Ubuntu 20_04. I am glad that you have found a fix for your Linux distribution.
Is there a new version ?
Will it be patched ?
Robert
Posts: 29
Joined: Fri May 15, 2020 8:27 am

You could try the latest release of the F4PGA group as they are maintaining Symbiflow

https://f4pga-examples.readthedocs.io/e ... ml#getting

They only support Ubuntu, Debian, Centos and Fedora so this may not fix the issue you have with Mint
Athelstanr24
Posts: 1
Joined: Mon May 20, 2024 6:52 am

Greet,
Looks like you're having problems running Yosys slice master in FPGA synthesis on Linux Mint 21 (Vanessa) with the qorc-sdk tool. The error you encountered is related to the libffi library.
Reason
This error usually occurs due to incompatibility between the version of Yosys and the libffi library installed on your system. The version of Yosys you are using requires a specific version of libffi, but your system may be using a different version.
Solution
Here are some steps you can try to fix this problem:
1. Install libffi-dev library
Make sure you have libffi-dev library installed on your system.
sudo apt-get update
sudo apt-get install libffi-dev
2. Create a symbolic link to libffi
Sometimes creating a symlink to a specific version of libffi can solve the problem:
bash
Copy the code
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
3. Check the version of Yosys
Make sure you are using the latest version of Yosys. You can download and install the latest version from the official Yosys site or from open source.
sudo apt-get remove yosys
git cloneh.ttps://github.com/YosysHQ/yosys.git
cd yosys
make
sudo make install
4. Update and check environment variables
Make sure the environment variables are pointing correctly to the Yosys and libffi installation directories.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
source envsetup.sh
5. Install from source package
If the problem still doesn't fix, you can try installing Yosys from the source package:
git cloneh.ttps://github.com/YosysHQ/yosys.git
cd yosys
make config-gcc
make
sudo make install
whoopigoldber
Posts: 1
Joined: Fri Jul 19, 2024 4:17 am

Symbiflow 20_04 has been the only version tested so far. There must be a solution for your Linux distribution, because I'm happy for you.
harrystyles7117
Posts: 2
Joined: Fri Jul 26, 2024 8:01 am

How do you say do you have any update?
papa's games
harrystyles7117
Posts: 2
Joined: Fri Jul 26, 2024 8:01 am

How do you say do you have any update?
papa's games
Post Reply