Opened 7 months ago

Last modified 3 weeks ago

#69790 assigned defect

pulseaudio @17.0_0: error: incompatible function pointer types passing 'int (const struct dirent *)' to parameter of type 'int (*)(struct dirent *)' [-Wincompatible-function-pointer-types]

Reported by: RobK88 Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: lion Cc: RobK88, cooljeanius (Eric Gallager), barracuda156, mascguy (Christopher Nielsen)
Port: pulseaudio

Description

Pulseaudio @17.0_0 fails to build on Lion.

--->  Computing dependencies for pulseaudio
--->  Fetching archive for pulseaudio
--->  Attempting to fetch pulseaudio-17.0_0+x11.darwin_11.x86_64.tbz2 from http://packages.macports.org/pulseaudio
--->  Attempting to fetch pulseaudio-17.0_0+x11.darwin_11.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/pulseaudio
--->  Attempting to fetch pulseaudio-17.0_0+x11.darwin_11.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/pulseaudio
--->  Fetching distfiles for pulseaudio
--->  Attempting to fetch pulseaudio-17.0.tar.xz from http://distfiles.macports.org/pulseaudio
--->  Verifying checksums for pulseaudio                                             
--->  Extracting pulseaudio
--->  Applying patches to pulseaudio
--->  Configuring pulseaudio
--->  Building pulseaudio                                
Error: Failed to build pulseaudio: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

See attached main.log

Attachments (1)

main.log (50.4 KB) - added by RobK88 7 months ago.
main.log

Download all attachments as: .zip

Change History (11)

Changed 7 months ago by RobK88

Attachment: main.log added

main.log

comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: Ionic removed
Owner: set to Ionic
Status: newassigned
Summary: Pulseaudio @17.0_0 Fails to Build on Lionpulseaudio @17.0_0: error: incompatible function pointer types passing 'int (const struct dirent *)' to parameter of type 'int (*)(struct dirent *)' [-Wincompatible-function-pointer-types]

The log says the problem is:

../pulseaudio-17.0/src/pulsecore/conf-parser.c:268:41: error: incompatible function pointer types passing 'int (const struct dirent *)' to parameter of type 'int (*)(struct dirent *)' [-Wincompatible-function-pointer-types]
        n = scandir(dir_name, &entries, conf_filter, alphasort);
                                        ^~~~~~~~~~~
/usr/include/dirent.h:129:11: note: passing argument to parameter here
    int (*)(struct dirent *), int (*)(const void *, const void *)) __DARWIN_INODE64(scandir);
          ^
1 error generated.

comment:2 Changed 7 months ago by RobK88

Here is a workaround until this port is fixed:

bash-3.2$ sudo port clean pulseaudio
--->  Cleaning pulseaudio
bash-3.2$ 
bash-3.2$ sudo port -v upgrade pulseaudio configure.compiler=macports-clang-11
etc
--->  Cleaning pulseaudio
--->  Removing work directory for pulseaudio
--->  Updating database of binaries
--->  Scanning binaries for linking errors

Note: pulseaudio @17.0_0 does NOT build on Lion using clang-16 since clang-16 is too strict. pulseaudio does build using clang-11. I suspect it also builds using clang-15 but I have not tried that.

Last edited 7 months ago by RobK88 (previous) (diff)

comment:3 Changed 7 months ago by RobK88

Cc: RobK88 added

comment:4 Changed 7 months ago by RobK88

Same problem with pulseaudio @17.0_1 on Lion. But the same workaround using an older compiler still works. See below:

bash-3.2$ sudo port clean pulseaudio
--->  Cleaning pulseaudio
bash-3.2$ 
bash-3.2$ 
bash-3.2$ sudo port upgrade pulseaudio configure.compiler=macports-clang-11
--->  Computing dependencies for pulseaudio
--->  Fetching archive for pulseaudio
--->  Attempting to fetch pulseaudio-17.0_1+x11.darwin_11.x86_64.tbz2 from http://packages.macports.org/pulseaudio
--->  Attempting to fetch pulseaudio-17.0_1+x11.darwin_11.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/pulseaudio
--->  Attempting to fetch pulseaudio-17.0_1+x11.darwin_11.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/pulseaudio
--->  Fetching distfiles for pulseaudio
--->  Verifying checksums for pulseaudio
--->  Extracting pulseaudio
--->  Applying patches to pulseaudio
--->  Configuring pulseaudio
--->  Building pulseaudio                                
--->  Staging pulseaudio into destroot                   
--->  Installing pulseaudio @17.0_1+x11                  
--->  Cleaning pulseaudio
--->  Computing dependencies for pulseaudio
--->  Deactivating pulseaudio @17.0_0+x11
--->  Cleaning pulseaudio
--->  Activating pulseaudio @17.0_1+x11
--->  Cleaning pulseaudio
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
bash-3.2$

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

comment:6 Changed 7 months ago by RobK88

@ryandesign - Thanks for pointing out the solution. I will see if I can fix geany first. Then I will look at pulseaudio unless @Ionic fixes it first.

comment:7 Changed 5 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:8 in reply to:  6 Changed 6 weeks ago by barracuda156

Same error with gcc:

:notice:build --->  Building pulseaudio
:debug:build Executing org.macports.build (pulseaudio)
:debug:build Environment: 
:debug:build CC_PRINT_OPTIONS='YES'
:debug:build CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/.CC_PRINT_OPTIONS'
:debug:build CPATH='/opt/local/include'
:debug:build DEVELOPER_DIR='/Developer'
:debug:build LIBRARY_PATH='/opt/local/lib'
:debug:build MACOSX_DEPLOYMENT_TARGET='10.5'
:debug:build SOURCE_DATE_EPOCH='1728661324'
:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build" && /opt/local/bin/ninja -j1 -v 
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build" && /opt/local/bin/ninja -j1 -v 
:info:build [1/424] /opt/local/bin/gcc-mp-14 -Isrc/libpulsecommon-17.0.dylib.p -I. -I../pulseaudio-17.0 -Isrc -I../pulseaudio-17.0/src -I/opt/local/include/opus -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu11 -O0 -g -pipe -Os -arch ppc -DHAVE_CONFIG_H -D_GNU_SOURCE -MD -MQ src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -MF src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o.d -o src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -c ../pulseaudio-17.0/src/pulsecore/conf-parser.c
:info:build FAILED: src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o 
:info:build /opt/local/bin/gcc-mp-14 -Isrc/libpulsecommon-17.0.dylib.p -I. -I../pulseaudio-17.0 -Isrc -I../pulseaudio-17.0/src -I/opt/local/include/opus -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -std=gnu11 -O0 -g -pipe -Os -arch ppc -DHAVE_CONFIG_H -D_GNU_SOURCE -MD -MQ src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -MF src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o.d -o src/libpulsecommon-17.0.dylib.p/pulsecore_conf-parser.c.o -c ../pulseaudio-17.0/src/pulsecore/conf-parser.c
:info:build ../pulseaudio-17.0/src/pulsecore/conf-parser.c: In function 'pa_config_parse':
:info:build ../pulseaudio-17.0/src/pulsecore/conf-parser.c:268:41: error: passing argument 3 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types]
:info:build   268 |         n = scandir(dir_name, &entries, conf_filter, alphasort);
:info:build       |                                         ^~~~~~~~~~~
:info:build       |                                         |
:info:build       |                                         int (*)(const struct dirent *)
:info:build In file included from ../pulseaudio-17.0/src/pulsecore/conf-parser.c:24:
:info:build /usr/include/dirent.h:119:5: note: expected 'int (*)(struct dirent *)' but argument is of type 'int (*)(const struct dirent *)'
:info:build   119 |     int (*)(struct dirent *), int (*)(const void *, const void *)) __DARWIN_INODE64(scandir);
:info:build       |     ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build ninja: build stopped: subcommand failed.
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_pulseaudio/pulseaudio/work/build" && /opt/local/bin/ninja -j1 -v 
:info:build Exit code: 1
  1. S. Notice, the flag must be different.

comment:9 Changed 6 weeks ago by barracuda156

Cc: barracuda156 added

comment:10 Changed 3 weeks ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Note: See TracTickets for help on using tickets.