#142 configure.ac patch for (Free)BSD

0.0.18
closed-fixed
Guilherme
None
5
2014-02-19
2014-02-18
Joerg Wunsch
No

qucs-0.0.18.131128 failed to build under FreeBSD. In particular, the Qt
libraries are not found. Searching for them appeared to be originally intended
but then disabled in configure.ac, so all this could only work if Qt was
installed in a path where the linker would search for its libraries anyway.

I extended the commented-out library search in configure.ac, and made it work.

There are a couple of related minor changes. (I wonder whether the support
for FreeBSD 4's odd pthread handling is really worth keeping. FreeBSD 4.x is
really old now, and I doubt anyone would still want to use such a machine to
run things like Qucs on it.)

1 Attachments

Discussion

  • Guilherme
    Guilherme
    2014-02-18

    Thank you for the patch. I believe the last time anyone tried to compile on FreeBDS was for Qucs on version 0.0.16 still using Qt3 (http://www.freshports.org/cad/qucs/).

    I guess none of the developers use FreeBSD. If you have further fixes on this platform please continue sending them.

    Is Qucs running okay on FreeBDS? I will push you patch to our master branch.

     
  • Guilherme
    Guilherme
    2014-02-18

    • status: open --> accepted
    • assigned_to: Guilherme
     
  • Joerg Wunsch
    Joerg Wunsch
    2014-02-18

    Is Qucs running okay on FreeBSD?

    With both these patches, it works. (It requires GNU make since the $(RCC)
    invocation uses $@ which is only defined for inference rules in non-GNU
    make dialects. Could probably be fixed, too, but using gmake was simple
    enough also.)

    I didn't do any extensive testing so far, but at a first glance, it seems
    to work about the same as the old Qt3-only versions. I could open my old
    project files, and simulate them. Didn't try to simulate anything that has
    been problematic in the past though (like, projects that used to run into
    a Jakobian singular).

    Qucs has been dropped from the FreeBSD ports recently due to relying on
    the old, unmaintained (and thus removed) Qt3 stuff. With the recent versions
    no longer requiring Qt3, I hope I could convince the port maintainer to
    include it again.

     
  • Guilherme
    Guilherme
    2014-02-19

    • status: accepted --> closed-fixed
     
  • Guilherme
    Guilherme
    2014-02-19

    Pushed your patch to master.

    Your default make is the BSD make (not GNU make) is that correct?

    From here: http://lists.freebsd.org/pipermail/freebsd-questions/2007-April/147533.html
    I guess we could replace $@ by $^ to be more portable. I will take a look.

    I am curious to know which versions of FreeBSD, compiler and Qt you are currently using. Do you mind sharing this info?

     
  • Joerg Wunsch
    Joerg Wunsch
    2014-02-19

    Your default make is the BSD make (not GNU make) is that correct?

    Right.

    I guess we could replace $@ by $^ to be more portable.

    No, that doesn't help. BSD make only uses the implicit macro names
    inside inference (i.e. suffix) rules. (I think SystemV make [Solaris]
    does the same.) So in order to make it compatible with generic make
    flavours, I only see two options:

    . Explicitly specify the source and target in each rule.
    . Turn it into an inference rule that derives a .cpp file from a .qrc file:

    .SUFFIXES: .qrc
    .qrc.cpp:
        $(RCC) -o $@ $<
    

    However, that would require renaming the .qrc files in order to avoid
    name clashes, I think.

    But it's a minor issue. It would suffice as well to simply state in the
    INSTALL (or README) file that GNU make is required.

    I am curious to know which versions of FreeBSD, compiler and Qt you are
    currently using. Do you mind sharing this info?

    My FreeBSD version is pretty old, it's somewhat past 8.2. I really should
    upgrade. ;-) The compiler used was a GCC 4.7, Qt version is 4.8.5