Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#64937 closed defect (fixed)

usbredir @0.9.0: warning: ‘GTimeVal’ is deprecated

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, snowleopard, rosetta Cc:
Port: usbredir

Description

In file included from /opt/local/include/glib-2.0/gio/gio.h:81,
                 from usbredirect.c:9:
/opt/local/include/glib-2.0/gio/gfileinfo.h:1054: warning: ‘GTimeVal’ is deprecated
/opt/local/include/glib-2.0/gio/gfileinfo.h:1105: warning: ‘GTimeVal’ is deprecated
In file included from /opt/local/include/glib-2.0/gio/gtlsclientconnection.h:26,
                 from /opt/local/include/glib-2.0/gio/gio.h:160,
                 from usbredirect.c:9:
/opt/local/include/glib-2.0/gio/gtlsconnection.h:115: warning: ‘GTlsRehandshakeMode’ is deprecated
make[2]: *** [usbredirect-usbredirect.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0'
make: *** [all] Error 2

Attachments (4)

main.log (84.1 KB) - added by barracuda156 3 years ago.
config.log (67.9 KB) - added by barracuda156 3 years ago.
main_10.6.8_2.log (133.5 KB) - added by barracuda156 3 years ago.
main_10.6.8_gcc10.log (39.5 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by barracuda156

Attachment: main.log added

Changed 3 years ago by barracuda156

Attachment: config.log added

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

Owner: set to ryandesign
Status: newaccepted

I can reproduce that problem on macOS 10.15.7 if I use apple-gcc42 and build with the 10.11 SDK.

$ sudo port install MacOSX10.11.sdk
$ sudo port -n install apple-gcc42 os.major=15
$ sudo port -dn build usbredir configure.compiler=apple-gcc-4.2 configure.sdkroot=/opt/local/Developer/SDKs/MacOSX10.11.sdk

Looks like with apple-gcc42 we're getting some warnings, and the build system treats warnings as errors (it uses -Werror). As usual in MacPorts I think the fix should be not to use -Werror; that fixes the problem for me.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In e9a7bd7f76ad205735922cd3550b31a8cc57cb2c/macports-ports (master):

usbredir: Don't use -Werror

Closes: #64937

comment:3 in reply to:  2 Changed 3 years ago by barracuda156

Replying to ryandesign:

In e9a7bd7f76ad205735922cd3550b31a8cc57cb2c/macports-ports (master):

usbredir: Don't use -Werror

Closes: #64937

That error is fixed, but it fails further:

/usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include/libusb-1.0 -I../usbredirhost -I../usbredirparser -pipe -Os -arch ppc -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -MT usbredirserver-usbredirserver.o -MD -MP -MF .deps/usbredirserver-usbredirserver.Tpo -c -o usbredirserver-usbredirserver.o `test -f 'usbredirserver.c' || echo './'`usbredirserver.c
usbredirserver.c: In function ‘main’:
usbredirserver.c:390: error: ‘TCP_KEEPINTVL’ undeclared (first use in this function)
usbredirserver.c:390: error: (Each undeclared identifier is reported only once
usbredirserver.c:390: error: for each function it appears in.)
usbredirserver.c:397: error: ‘TCP_KEEPCNT’ undeclared (first use in this function)
make[2]: *** [usbredirserver-usbredirserver.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0/usbredirserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0'
make: *** [all] Error 2

Changed 3 years ago by barracuda156

Attachment: main_10.6.8_2.log added

comment:4 in reply to:  1 Changed 3 years ago by barracuda156

Replying to ryandesign:

Looks like with apple-gcc42 we're getting some warnings, and the build system treats warnings as errors (it uses -Werror). As usual in MacPorts I think the fix should be not to use -Werror; that fixes the problem for me.

It also fails with gcc10:

Making all in usbredirserver
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0/usbredirserver'
/opt/local/bin/gcc-mp-10 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include/libusb-1.0 -I../usbredirhost -I../usbredirparser -pipe -Os -arch ppc -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -MT usbredirserver-usbredirserver.o -MD -MP -MF .deps/usbredirserver-usbredirserver.Tpo -c -o usbredirserver-usbredirserver.o `test -f 'usbredirserver.c' || echo './'`usbredirserver.c
usbredirserver.c: In function 'main':
usbredirserver.c:390:48: error: 'TCP_KEEPINTVL' undeclared (first use in this function); did you mean 'TCP_KEEPALIVE'?
  390 |             if (setsockopt(client_fd, SOL_TCP, TCP_KEEPINTVL, &optval, optlen) == -1) {
      |                                                ^~~~~~~~~~~~~
      |                                                TCP_KEEPALIVE
usbredirserver.c:390:48: note: each undeclared identifier is reported only once for each function it appears in
usbredirserver.c:397:48: error: 'TCP_KEEPCNT' undeclared (first use in this function); did you mean 'TCP_KEEPIDLE'?
  397 |             if (setsockopt(client_fd, SOL_TCP, TCP_KEEPCNT, &optval, optlen) == -1) {
      |                                                ^~~~~~~~~~~
      |                                                TCP_KEEPIDLE
make[2]: *** [usbredirserver-usbredirserver.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0/usbredirserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_usbredir/usbredir/work/usbredir-0.9.0" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build usbredir: command execution failed

Changed 3 years ago by barracuda156

Attachment: main_10.6.8_gcc10.log added

comment:5 Changed 3 years ago by barracuda156

Summary: usbredir fails on 10.6.8 Rosettausbredir fails on 10.6.8 Rosetta: error: ‘TCP_KEEPINTVL’ undeclared

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: usbredir fails on 10.6.8 Rosetta: error: ‘TCP_KEEPINTVL’ undeclaredusbredir @0.9.0: warning: ‘GTimeVal’ is deprecated

Yes but it's a different problem so it should be reported in a new ticket.

comment:7 in reply to:  6 Changed 3 years ago by barracuda156

Replying to ryandesign:

Yes but it's a different problem so it should be reported in a new ticket.

Thank you, done: https://trac.macports.org/ticket/64941

Note: See TracTickets for help on using tickets.