-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On elderly macOS High Sierra, version 10.13.6 or Darwin 17.7.0, tests fail due to pointer mismatch #13
Comments
In MacPorts the test programmes run in the build directory which is quite long from the start:
≈150 characters. In C header files I can see a limit:
If the sockets are created in the same directory where the code or the test files reside then a crash will happen with MacPorts. So it's probably not a problem with C data types as I presumed… |
Sounds like sockets should be created in $TMPDIR not in the current directory. |
I found a test that checks for the length of the pathname to te socket:
|
I found another software that fails tests in MacPorts: PostgreSQL. |
I managed to shorten the long path under which a Perl Module is built and tested sufficiently. Testing FCGI now succeeds. It should be worth to catch the failure due to the socket's too long path name and report exactly this. It's a bit uncommon that some path names are so limited in length. |
When testing I found an interesting Perl Module that, at least, tries to perform how it should: DBD-mysql-5.010. But it has no permission (yet) to perform orderly:
(Later repeated failure.) The reason is obvious: no permission to create subdirectory mysql8 in /opt/local/var/run. MacPorts' Trac DB has no mention why this port tries to use a directory that belongs to MacPorts, maybe Ryan can add something… After sleep I'll try to work around this failure and shall report here. |
The p5.34-dbd-mysql case is different: The socket is created by a running MySQL 8 DB instance. This creation works, p5.34-dbd-mysql knows of this and just tries to connect to the running DB via this socket. |
The module builds and installs fine, but tests fail (performing them inside the MacPorts package manager, port):
time port -vs test p5.34-fcgi p5.38-fcgi
---> Computing dependencies for p5.34-fcgi.
---> Fetching distfiles for p5.34-fcgi
---> Verifying checksums for p5.34-fcgi
---> Checksumming FCGI-0.82.tar.gz
---> Extracting p5.34-fcgi
---> Extracting FCGI-0.82.tar.gz
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-fcgi/p5.34-fcgi/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/perl5/FCGI-0.82.tar.gz' | /usr/bin/tar -xf -
---> Configuring p5.34-fcgi
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-fcgi/p5.34-fcgi/work/FCGI-0.82" && /opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang"
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for FCGI
Writing MYMETA.yml and MYMETA.json
Running ./configure for you
Please read configure.readme for information on how to run it yourself
checking for gcc... /usr/bin/cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /usr/bin/cc accepts -g... yes
checking for /usr/bin/cc option to enable C11 features... none needed
checking how to run the C preprocessor... /usr/bin/cc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for ssize_t... yes
checking for sun_len in sys/un.h... yes
checking for fpos_t in stdio.h... yes
checking for sys/socket.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for arpa/inet.h... yes
checking for sys/time.h... yes
checking for limits.h... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for a fileno() prototype in stdio.h... yes
checking whether cross-process locking is required by accept()... no
checking whether va_arg(arg, long double) crashes the compiler... no
checking for an ANSI C-conforming const... yes
configure: creating ./config.status
config.status: creating fcgi_config.h
Fixing flags in Makefile
---> Patching Makefile: /^CCFLAGS *=/s|$| -isysroot/|
---> Patching Makefile: /^OTHERLDFLAGS *=/s|$| -Wl,-syslibroot,/|
---> Patching Makefile: s|^(CC =).|\1 /usr/bin/clang|
---> Building p5.34-fcgi
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-fcgi/p5.34-fcgi/work/FCGI-0.82" && /usr/bin/make -j8 -w all
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-fcgi/p5.34-fcgi/work/FCGI-0.82'
"/opt/local/bin/perl5.34" "/opt/local/lib/perl5/5.34/ExtUtils/xsubpp" -typemap '/opt/local/lib/perl5/5.34/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-fcgi/p5.34-fcgi/work/FCGI-0.82/typemap' FCGI.xs > FCGI.xsc
Running Mkbootstrap for FCGI ()
/usr/bin/clang -c -I. -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -isysroot/ -O3 -DVERSION="0.82" -DXS_VERSION="0.82" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE" fcgiapp.c
/usr/bin/clang -c -I. -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -isysroot/ -O3 -DVERSION="0.82" -DXS_VERSION="0.82" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE" os_unix.c
chmod 644 "FCGI.bs"
"/opt/local/bin/perl5.34" -MExtUtils::Command::MM -e 'cp_nonempty' -- FCGI.bs blib/arch/auto/FCGI/FCGI.bs 644
cp FCGI.pm blib/arch/FCGI.pm
os_unix.c:1173:70: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
socket = accept(listen_sock, (struct sockaddr *)&sa, &len);
^~~~
/usr/include/sys/socket.h:681:69: note: passing argument to parameter here
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict)
^
os_unix.c:1273:51: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
if (getpeername(sock, (struct sockaddr *)&sa, &len) != 0 && errno == ENOTCONN) {
^~~~
/usr/include/sys/socket.h:685:74: note: passing argument to parameter here
int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict)
^
mv FCGI.xsc FCGI.c
/usr/bin/clang -c -I. -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -isysroot/ -O3 -DVERSION="0.82" -DXS_VERSION="0.82" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE" FCGI.c
2 warnings generated.
FCGI.xs:187:19: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (was_bound = request->bound)
The text was updated successfully, but these errors were encountered: