#68663 closed defect (fixed)

faad2 @2.11.0+universal: error: conflicting types for 'lrintf'

Reported by: RobK88 Owned by: aeiouaeiouaeiouaeiouaeiouaeiou
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: i386 Cc: RobK88
Port: faad2

Description (last modified by RobK88)

I am unable to upgrade faad2 to @2.11.0 on High Sierra.

bash-3.2$ port outdated
The following installed ports are outdated:
faad2                          2.10.1_0 < 2.11.0_0       
gpgme                          1.22.0_0 < 1.23.1_0       

bash-3.2$ sudo port -v upgrade faad2
--->  Computing dependencies for faad2
--->  Fetching archive for faad2
etc
etc
[  0%] Building C object CMakeFiles/faad_drm.dir/libfaad/bits.c.o
/usr/bin/clang -DAPPLY_DRC -DDRM_SUPPORT -DHAVE_INTTYPES_H=1 -DHAVE_MEMCPY=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DPACKAGE_VERSION=\"2.11.0\" -DSTDC_HEADERS=1 -Dfaad_drm_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad -pipe -Os -DNDEBUG -I/opt/local/include -arch x86_64 -arch i386 -mmacosx-version-min=10.13 -fPIC -fvisibility=hidden -Wall -pedantic -MD -MT CMakeFiles/faad_drm.dir/libfaad/bits.c.o -MF CMakeFiles/faad_drm.dir/libfaad/bits.c.o.d -o CMakeFiles/faad_drm.dir/libfaad/bits.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/bits.c
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/bits.c:31:
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:377:
/usr/include/math.h:485:17: error: conflicting types for 'lrintf'
extern long int lrintf(float);
                ^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:342:23: note: previous definition is here
    static INLINE int lrintf(float f)
                      ^
1 error generated.
make[2]: *** [CMakeFiles/faad.dir/libfaad/bits.c.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build'
make[1]: *** [CMakeFiles/faad.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/bits.c:31:
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:377:
/usr/include/math.h:485:17: error: conflicting types for 'lrintf'
extern long int lrintf(float);
                ^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:342:23: note: previous definition is here
    static INLINE int lrintf(float f)
                      ^
[  1%] Building C object CMakeFiles/faad_drm.dir/libfaad/cfft.c.o
/usr/bin/clang -DAPPLY_DRC -DDRM_SUPPORT -DHAVE_INTTYPES_H=1 -DHAVE_MEMCPY=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DPACKAGE_VERSION=\"2.11.0\" -DSTDC_HEADERS=1 -Dfaad_drm_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad -pipe -Os -DNDEBUG -I/opt/local/include -arch x86_64 -arch i386 -mmacosx-version-min=10.13 -fPIC -fvisibility=hidden -Wall -pedantic -MD -MT CMakeFiles/faad_drm.dir/libfaad/cfft.c.o -MF CMakeFiles/faad_drm.dir/libfaad/cfft.c.o.d -o CMakeFiles/faad_drm.dir/libfaad/cfft.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/cfft.c
1 error generated.
make[2]: *** [CMakeFiles/faad_drm.dir/libfaad/bits.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/cfft.c:40:
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:377:
/usr/include/math.h:485:17: error: conflicting types for 'lrintf'
extern long int lrintf(float);
                ^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/faad2-2.11.0/libfaad/common.h:342:23: note: previous definition is here
    static INLINE int lrintf(float f)
                      ^
1 error generated.
make[2]: *** [CMakeFiles/faad_drm.dir/libfaad/cfft.c.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build'
make[1]: *** [CMakeFiles/faad_drm.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON 
Exit code: 2
Error: Failed to build faad2: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_faad2/faad2/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Attachments (1)

main.log (24.8 KB) - added by RobK88 11 months ago.

Download all attachments as: .zip

Change History (8)

Changed 11 months ago by RobK88

Attachment: main.log added

comment:1 Changed 11 months ago by RobK88

Description: modified (diff)

comment:2 Changed 11 months ago by RobK88

Summary: faad2 @2.11.0 - Unable to Upgrade on High Sierrafaad2 @2.11.0 - Unable to Upgrade on High Sierra - error: conflicting types for 'lrintf'

comment:3 Changed 11 months ago by RobK88

Cc: RobK88 added

comment:4 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: i386 added; highsierra removed
Summary: faad2 @2.11.0 - Unable to Upgrade on High Sierra - error: conflicting types for 'lrintf'faad2 @2.11.0+universal: error: conflicting types for 'lrintf'

It's not specific to High Sierra, but it is specific to building for i386. We see the same problem on our Snow Leopard i386 builder but not on any of the x86_64 or arm64 builders.

The code does this:

  #elif (defined(__i386__) && defined(__GNUC__) && \
        !defined(__CYGWIN__) && !defined(__MINGW32__))
    #ifndef HAVE_LRINTF
    #define HAS_LRINTF
    // from http://www.stereopsis.com/FPU.html
    static INLINE int lrintf(float f)

etc. Clearly your system has lrintf so something has gone wrong and HAVE_LRINTF hasn't been defined when it should have. Even on my Monterey x86_64 system, I do not see any occurrences of HAVE_LRINTF in the work directory, even after configuring, except in common.h.

It's an upstream bug, of course. I don't see it reported yet. I'll file it in a moment.

comment:5 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

comment:6 Changed 11 months ago by RobK88

@Ryan -- Thanks for submitting the bug upstream. It looks like the developer has fixed the bug. We can either add a patchfile to the existing port for faad2 or wait until the developer releases a new version.

comment:7 Changed 11 months ago by aeiouaeiouaeiouaeiouaeiouaeiou

Owner: set to aeiouaeiouaeiouaeiouaeiouaeiou
Resolution: fixed
Status: newclosed

In 7b4f9aa2676882942ebdda0b490963e8ca3af5a7/macports-ports (master):

faad2: update cmake patch

Closes: #68663

Note: See TracTickets for help on using tickets.