Bug 1207310 - freehdl is missing *.la files
Summary: freehdl is missing *.la files
Alias: None
Product: Fedora
Classification: Fedora
Component: freehdl
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Kiara Navarro
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-03-30 16:32 UTC by Stefan Becker
Modified: 2015-12-02 17:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-12-02 10:41:00 UTC
Type: Bug

Attachments (Terms of Use)

Description Stefan Becker 2015-03-30 16:32:43 UTC
Description of problem:

Circuit simulation with "qucs" no longer works. Compiling the project aborts with an error message, because freehdl no longer contains the required .la files:

* Thu Feb 26 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.0.8-10
- Remove %{optflags} from freehdl.pc (RHBZ#1196512).
- Modernize spec.
- Remove *.las.

But freehdl still is configured to use those .la files:

$ freehdl-config --libtool
/usr/lib64/libfreehdl-kernel.la /usr/lib64/libfreehdl-std.la

$ freehdl-config --ieee

Output in qucs when pressing F2 (Simulate):

 Starting new simulation on Mon 30. Mar 2015 at 19:18:48

creating netlist... done.
running C++ conversion... done.
compiling functions... done.
compiling main... done.cd
Errors occurred during simulation on Mon 30. Mar 2015 at 19:18:49

libtool: link: cannot find the library `/usr/lib64/libfreehdl-kernel.la' or unhandled argument `/usr/lib64/libfreehdl-kernel.la'

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. open project in qucs
2. press F2 to start simulation

Actual results:
Project fails with linker error

Expected results:
Project compiles and simulation starts

Additional info:
Related error from another Linux distribution: https://bugs.mageia.org/show_bug.cgi?id=13350

One option to fix this would be to create "freehdl-devel" and then make "qucs" to depend on it.

Comment 1 Stefan Becker 2015-03-31 13:07:56 UTC
I could get "qucs" simulation working again by fixing up /bin/freehdl-config:

--- /bin/freehdl-config.ORIG    2015-02-26 19:31:08.000000000 +0200
+++ /bin/freehdl-config 2015-03-31 15:17:39.295286396 +0300
@@ -39,7 +39,7 @@
        echo "-L$libdir" ;;

   --libtool | -libtool | -libs)
-       echo "$libdir/libfreehdl-kernel.la $libdir/libfreehdl-std.la" ;;
+       echo "-lfreehdl-kernel -lfreehdl-std" ;;

   --ieee | -ieee)
        echo "$libdir/freehdl/libieee.la" ;;

i.e. instead of linking with the .la's I tell libtool to link against the provided .so files.

Strangely enough, freehdl package still provides libieee.la, so no change required for the "--ieee" switch.

Comment 2 Ralf Corsepius 2015-03-31 14:00:26 UTC
Stefan, could you try Mageia's patch:


Comment 3 Stefan Becker 2015-03-31 15:41:49 UTC
The patch alone is incomplete and will not work. But this is what *DOES* work:

- remove /usr/lib64/freehdl/libieee.la
- add /etc/ld.so.conf.d/freehdl-x86_64.conf


- run "ldconfig" to update the linker configuration cache
- apply the patch to freehdl-config:

--- /bin/freehdl-config.ORIG    2015-02-26 19:31:08.000000000 +0200
+++ /bin/freehdl-config 2015-03-31 18:20:31.241242354 +0300
@@ -36,13 +36,13 @@
        echo "$version" ;;

   --ldflags | -ldflags | -l)
-       echo "-L$libdir" ;;
+       echo "-L$libdir/freehdl -L$libdir" ;;

   --libtool | -libtool | -libs)
-       echo "$libdir/libfreehdl-kernel.la $libdir/libfreehdl-std.la" ;;
+       echo "-lfreehdl-kernel -lfreehdl-std" ;;

   --ieee | -ieee)
-       echo "$libdir/freehdl/libieee.la" ;;
+       echo "-lieee" ;;

   --cxxflags | -cxxflags | -c)
        echo "$cxxflags -I$includedir" ;;

Now "qucs" simulations compile & run without any .la files provided by freehdl.

I would still suggest to create freehdl-devel, to follow the usual convention that development files should be provided by a "-devel" package:


But this will require packages like qucs to depend on freehdl-devel instead of freehdl.

Comment 4 Ralf Corsepius 2015-04-01 03:03:48 UTC
(In reply to Stefan Becker from comment #3)
> The patch alone is incomplete and will not work. But this is what *DOES*
> work:
> - remove /usr/lib64/freehdl/libieee.la
> - add /etc/ld.so.conf.d/freehdl-x86_64.conf

Thanks, that's what I had expected.

However, this means freehdl is broken. It installs libieee into a bogus location libdir/freehdl is a location appropriate for plugins/dlopened libs, but not for a shared library.

Comment 5 Stefan Becker 2015-04-01 03:40:17 UTC
I guess the root cause is the possible name clash from libieee.so.0. All other libraries include the "freehdl-" part.

If you only apply the patch (not the libieee.la removal & ld.so.conf.d addition), then you need to keep libieee.la, because then the resulting binary will end up with RPATH that points to the correct location of libieee.so.0:

 $ readelf --wide --all .qucs/digi | fgrep -e Shared -e rpath
  0x0000000000000001 (NEEDED)             Shared library: [libfreehdl-kernel.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [libfreehdl-std.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [libieee.so.0]
  0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
  0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
  0x000000000000000f (RPATH)              Library rpath: [/usr/lib64/freehdl]

freehdl-config provides "libtool" as the linker tool, not "ld", otherwise "-lieee" wouldn't lead to the processing of the libieee.la file.

So the simplest solution to the problem is still the patch from comment #1.

Comment 6 Stefan Becker 2015-04-02 16:15:24 UTC
Also the script "/bin/gvhdl" needs updating, because it has the libtool information hard-coded inside the script. Maybe this script is auto-generated, so after updating freehdl-config the build process generates a correct script?

The script is also broken for x86_64, because it hard-codes "lib" instead of "lib64" for the "libieee.la" location

--- /bin/gvhdl.ORIG     2015-02-26 19:31:09.000000000 +0200
+++ /bin/gvhdl  2015-04-02 19:13:19.486707319 +0300
@@ -9,7 +9,7 @@
 my $vhdl_source_name = "";
 my $source = "";
 my $includes = "";
-my $cpplibs = "-lm FREEHDL/lib/libfreehdl-kernel.la FREEHDL/lib/libfreehdl-std.la";
+my $cpplibs = "-lm -lfreehdl-kernel -lfreehdl-std";
 my $vhdl_library = ""; # Library the design entity is compiled into
 my $cpp_options = "";
 my $vhdl_options = "";
@@ -148,7 +148,7 @@
     } elsif ($argument =~ /^\--relaxed-component-visibility/) {
       $vhdl_options = $vhdl_options . " --relaxed-component-visibility";
     } elsif ($argument =~ /^\--libieee/) {
-       $cpplibs .= " " . update ("FREEHDL/lib/freehdl/libieee.la");
+       $cpplibs .= " " . update ("FREEHDL/lib64/freehdl/libieee.la");
     } elsif ($argument =~ /^\-/) {
       $cpp_options = $cpp_options . " " . $argument;
     } else {

Comment 7 Fedora Admin XMLRPC Client 2015-10-07 19:45:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Admin XMLRPC Client 2015-10-14 00:08:22 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora End Of Life 2015-11-04 10:11:48 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-12-02 10:41:04 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.