Ticket #344 (closed bug: fixed)

Opened 9 years ago

Last modified 9 years ago

gcc-4.7 compilation fix

Reported by: oget Assigned to: jwoithe
Priority: major Milestone:
Component: generic Version: FFADO SVN (trunk)
Keywords: Cc:
The device the bug applies to:


Hi all, It is that time of the year that the gcc folks decide to impose the standards at a higher level. Attached is a trivial patch that will make libffado compile against new gcc.

Best, Orcan


libffado-gcc47.patch (2.5 kB) - added by oget on 01/10/12 20:38:31.
compile fix
libffado-gcc47-v2.patch (3.8 kB) - added by oget on 03/22/12 19:30:07.

Change History

01/10/12 20:38:31 changed by oget

  • attachment libffado-gcc47.patch added.

compile fix

01/10/12 20:49:08 changed by oget

Just as a side information, as of gcc-4.7, "<unistd.h>" is no longer included in <iostream>,<string> and some other STL headers, hence we need to specify it directly from now on in order to access functions such as close(), sleep(), getpid(), etc.

01/11/12 00:56:35 changed by jwoithe

  • status changed from new to closed.
  • resolution set to fixed.

Thanks for the patch. This has been applied to trunk in in r2019.

03/22/12 19:30:07 changed by oget

  • attachment libffado-gcc47-v2.patch added.

03/22/12 19:30:38 changed by oget

  • status changed from closed to reopened.
  • resolution deleted.

Hi, apparently there is more to fix. Since r2019, there was 1 added source file to the trunk (src/dice/dice_firmware_loader.cpp ) that needed the <unistd.h>, moreover compiling the tests also revealed missing <unistd.h>s. gcc-4.7 says 1 test source file (tests/test-scs.cpp) has a scoping error. An iterator was declared twice within the same scope.

I am attaching a second patch to fix the issues.

03/22/12 19:57:25 changed by jwoithe

  • owner set to jwoithe.
  • status changed from reopened to new.

Thanks for the patch.

I'm onto it. However, I can't check the changes into the repo at present because svn access seems to be broken at present. I'll update this ticket when I've managed to get the repo updated.

03/22/12 19:57:45 changed by jwoithe

  • status changed from new to assigned.

03/23/12 04:30:36 changed by jwoithe

  • status changed from assigned to closed.
  • resolution set to fixed.

The repo's fixed now (thanks Paul). The patch has been applied and is in r2088. Thanks again.

03/23/12 07:06:41 changed by oget

Thanks for the quick response Jonathan. I appreciate it. Best regards - Orcan