Opened 5 years ago

Last modified 4 years ago

#60347 new defect

p5.28-socket6 @0.290.0: error: use of undeclared identifier 'sv_undef'

Reported by: SerpentChris (Chris Calderon) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: tgyurci (Teubel György)
Port: p5.28-socket6

Description

I noticed this while running port upgrade outdated. I'm running macOS Catalina 10.15.4. This is a dependency of p5.28-io-socket-ssl. Here is the error that is being reported by clang:

/usr/bin/clang -c   -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -arch x86_64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -O3   -DVERSION=\"0.29\" -DXS_VERSION=\"0.29\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   Socket6.c
Socket6.xs:110:9: warning: 'PL_sv_undef' macro redefined [-Wmacro-redefined]
#define PL_sv_undef             sv_undef
        ^
/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/embedvar.h:319:9: note: previous definition is here
#define PL_sv_undef             (vTHX->Isv_undef)
        ^
Socket6.xs:545:9: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
                      addrlen, alen);
                      ^~~~~~~
Socket6.xs:545:18: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
                      addrlen, alen);
                               ^~~~
Socket6.xs:624:9: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
                      sockaddrlen, sizeof(addr));
                      ^~~~~~~~~~~
Socket6.xs:624:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                      sockaddrlen, sizeof(addr));
                                   ^~~~~~~~~~~~
Socket6.xs:660:9: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
                      sockaddrlen, sizeof(addr));
                      ^~~~~~~~~~~
Socket6.xs:660:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
                      sockaddrlen, sizeof(addr));
                                   ^~~~~~~~~~~~
Socket6.xs:753:12: error: use of undeclared identifier 'sv_undef'
                                PUSHs(&PL_sv_undef);
                                       ^
Socket6.xs:110:22: note: expanded from macro 'PL_sv_undef'
#define PL_sv_undef             sv_undef
                                ^
Socket6.xs:911:35: warning: format specifies type 'int' but the argument has type 'STRLEN' (aka 'unsigned long') [-Wformat]
                    "Socket6::getipnodebyaddr", addrlen, alen);
                                                ^~~~~~~
8 warnings and 1 error generated.
make: *** [Socket6.o] Error 1

The full log is attached.

Attachments (1)

main.log (28.7 KB) - added by SerpentChris (Chris Calderon) 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by SerpentChris (Chris Calderon)

Attachment: main.log added

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: perl removed
Summary: p5.28-socket6 @0.290.0 : Build failure in Catalinap5.28-socket6 @0.290.0: error: use of undeclared identifier 'sv_undef'

We've seen this use of undeclared identifier 'sv_undef' error before with other perl software; see for example #43112. However the cause may be different here.

We have binaries of this port built for all versions of macOS, including Catalina. So at least we know there was not a general problem building this port back when those binaries were built. Do you know why your computer is trying to build this port from source rather than downloading our binary?

comment:2 in reply to:  1 Changed 5 years ago by SerpentChris (Chris Calderon)

Replying to ryandesign:

We've seen this use of undeclared identifier 'sv_undef' error before with other perl software; see for example #43112. However the cause may be different here.

We have binaries of this port built for all versions of macOS, including Catalina. So at least we know there was not a general problem building this port back when those binaries were built. Do you know why your computer is trying to build this port from source rather than downloading our binary?

It's building from source because I told it to in macports.conf. I have 8 cores on my 16 inch MBP, so I wanna use them! :)

I will try uninstalling everything and starting the build with a clean slate.

comment:3 Changed 4 years ago by saagarjha (Saagar Jha)

I ran into this issue recently because some of the Xcode updates doing some funny things with how their organized their SDKs, which was causing the configure step to think there was no PL_sv_undef (check config.log) because it was passing the wrong arguments there. Those came from stale flags when building perl5.28 with an old Xcode that I was no longer using, so in my case I uninstalled and reinstalled that (to get what I'm guessing is some sort of makefile template to use the right paths) and then the p5.28-socket6 installed cleanly. Just my 2¢; YMMV.

comment:4 Changed 4 years ago by tgyurci (Teubel György)

Cc: tgyurci added

comment:5 Changed 4 years ago by tgyurci (Teubel György)

I've run this issue too. I suspect that this port's build is broken because of the Xcode upgrade, because it has been build successfully some time earlier (I don't remember the exact time, sorry).

Versions:

DEBUG: macOS 10.15 (darwin/19.6.0) arch i386
DEBUG: MacPorts 2.6.4
DEBUG: Xcode 12.4
DEBUG: SDK 10.15
DEBUG: MACOSX_DEPLOYMENT_TARGET: 10.15
Note: See TracTickets for help on using tickets.