Opened 19 months ago

Last modified 17 months ago

#71127 new defect

libssh2 @1.11.1 does not build on PPC Leopard, Mac OS X 10.5.8, because of a faulty patch

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.2
Keywords: leopard ppc Cc: normen@…
Port: libssh2

Description

--->  Applying patches to libssh2
--->  Applying patch-libssh2-pragmas-older-gcc.diff
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1" && /usr/bin/patch -t -N -p0 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/devel/libssh2/files/patch-libssh2-pragmas-older-gcc.diff'
patching file example/x11.c
Hunk #1 FAILED at 325.
1 out of 1 hunk FAILED -- saving rejects to file example/x11.c.rej
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1" && /usr/bin/patch -t -N -p0 < '/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/devel/libssh2/files/patch-libssh2-pragmas-older-gcc.diff'
Exit code: 1
Error: Failed to patch libssh2: command execution failed

Attachments (5)

main.log (57.4 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8
x11.c.rej (929 bytes) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Rejected patch
main.2.log (79.1 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8, without patch applied and new #pragma failure
main.3.log (82.2 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8, with more new #pragma failures
patch-libssh2-1.11-pragmas-older-gcc.diff (11.5 KB) - added by ballapete (Peter "Pete" Dyballa) 19 months ago.
Set of patches to make libssh 1.11 compile with GCC 4

Download all attachments as: .zip

Change History (21)

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Leopard, Mac OS X 10.5.8

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: x11.c.rej added

Rejected patch

comment:1 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

The #pragmalines are gone, the configure stage starts without that patch applied.

comment:2 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

New problem now:

In file included from session.c:42:
libssh2_priv.h:49: warning: unknown option after '#pragma GCC diagnostic' kind
session.c:572: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
session.c:573: warning: unknown option after '#pragma GCC diagnostic' kind
session.c:585: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
session.c: In function '_libssh2_wait_socket':
session.c:679: error: #pragma GCC diagnostic not allowed inside functions
session.c:680: error: #pragma GCC diagnostic not allowed inside functions
session.c:684: error: #pragma GCC diagnostic not allowed inside functions
session.c:692: error: #pragma GCC diagnostic not allowed inside functions
session.c:693: error: #pragma GCC diagnostic not allowed inside functions
session.c:697: error: #pragma GCC diagnostic not allowed inside functions
session.c: In function 'libssh2_poll':
session.c:1659: error: #pragma GCC diagnostic not allowed inside functions
session.c:1660: error: #pragma GCC diagnostic not allowed inside functions
session.c:1664: error: #pragma GCC diagnostic not allowed inside functions
session.c:1671: error: #pragma GCC diagnostic not allowed inside functions
session.c:1672: error: #pragma GCC diagnostic not allowed inside functions
session.c:1676: error: #pragma GCC diagnostic not allowed inside functions
session.c:1685: error: #pragma GCC diagnostic not allowed inside functions
session.c:1686: error: #pragma GCC diagnostic not allowed inside functions
session.c:1690: error: #pragma GCC diagnostic not allowed inside functions
session.c:1700: error: #pragma GCC diagnostic not allowed inside functions
session.c:1701: error: #pragma GCC diagnostic not allowed inside functions
session.c:1705: error: #pragma GCC diagnostic not allowed inside functions
session.c:1884: error: #pragma GCC diagnostic not allowed inside functions
session.c:1885: error: #pragma GCC diagnostic not allowed inside functions
session.c:1897: error: #pragma GCC diagnostic not allowed inside functions
make[2]: *** [session.lo] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/src'

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

Main.log from PPC Leopard, Mac OS X 10.5.8, without patch applied and new #pragma failure

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.3.log added

Main.log from PPC Leopard, Mac OS X 10.5.8, with more new #pragma failures

comment:3 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

New #pragme failures:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
direct_tcpip.c: In function ‘main’:
direct_tcpip.c:252: error: #pragma GCC diagnostic not allowed inside functions
direct_tcpip.c:253: error: #pragma GCC diagnostic not allowed inside functions
direct_tcpip.c:257: error: #pragma GCC diagnostic not allowed inside functions
direct_tcpip.c:267: error: #pragma GCC diagnostic not allowed inside functions
direct_tcpip.c:268: error: #pragma GCC diagnostic not allowed inside functions
direct_tcpip.c:272: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [direct_tcpip.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:4 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

One more:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
  CCLD     direct_tcpip
  CC       scp.o
  CCLD     scp
  CC       scp_nonblock.o
scp_nonblock.c: In function ‘waitsocket’:
scp_nonblock.c:68: error: #pragma GCC diagnostic not allowed inside functions
scp_nonblock.c:69: error: #pragma GCC diagnostic not allowed inside functions
scp_nonblock.c:73: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [scp_nonblock.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:5 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

And more:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
  CCLD     direct_tcpip
  CC       scp.o
  CCLD     scp
  CC       scp_nonblock.o
  CCLD     scp_nonblock
  CC       scp_write.o
  CCLD     scp_write
  CC       scp_write_nonblock.o
scp_write_nonblock.c: In function ‘waitsocket’:
scp_write_nonblock.c:52: error: #pragma GCC diagnostic not allowed inside functions
scp_write_nonblock.c:53: error: #pragma GCC diagnostic not allowed inside functions
scp_write_nonblock.c:57: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [scp_write_nonblock.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:6 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

It's continuing:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
  CCLD     direct_tcpip
  CC       scp.o
  CCLD     scp
  CC       scp_nonblock.o
  CCLD     scp_nonblock
  CC       scp_write.o
  CCLD     scp_write
  CC       scp_write_nonblock.o
scp_write_nonblock.c: In function ‘waitsocket’:
scp_write_nonblock.c:52: error: #pragma GCC diagnostic not allowed inside functions
scp_write_nonblock.c:53: error: #pragma GCC diagnostic not allowed inside functions
scp_write_nonblock.c:57: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [scp_write_nonblock.o] Error 1

comment:7 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Still expecting an end:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
  CCLD     direct_tcpip
  CC       scp.o
  CCLD     scp
  CC       scp_nonblock.o
  CCLD     scp_nonblock
  CC       scp_write.o
  CCLD     scp_write
  CC       scp_write_nonblock.o
  CCLD     scp_write_nonblock
  CC       sftp.o
  CCLD     sftp
  CC       sftp_RW_nonblock.o
sftp_RW_nonblock.c: In function ‘waitsocket’:
sftp_RW_nonblock.c:60: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:61: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:65: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c: In function ‘main’:
sftp_RW_nonblock.c:262: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:263: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:268: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:333: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:334: error: #pragma GCC diagnostic not allowed inside functions
sftp_RW_nonblock.c:339: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [sftp_RW_nonblock.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:8 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Some progress:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'
  CC       direct_tcpip.o
  CCLD     direct_tcpip
  CC       scp.o
  CCLD     scp
  CC       scp_nonblock.o
  CCLD     scp_nonblock
  CC       scp_write.o
  CCLD     scp_write
  CC       scp_write_nonblock.o
  CCLD     scp_write_nonblock
  CC       sftp.o
  CCLD     sftp
  CC       sftp_RW_nonblock.o
  CCLD     sftp_RW_nonblock
  CC       sftp_append.o
  CCLD     sftp_append
  CC       sftp_mkdir.o
  CCLD     sftp_mkdir
  CC       sftp_mkdir_nonblock.o
  CCLD     sftp_mkdir_nonblock
  CC       sftp_nonblock.o
sftp_nonblock.c: In function ‘waitsocket’:
sftp_nonblock.c:69: error: #pragma GCC diagnostic not allowed inside functions
sftp_nonblock.c:70: error: #pragma GCC diagnostic not allowed inside functions
sftp_nonblock.c:74: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [sftp_nonblock.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:9 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

sftp_write_sliding.c: In function ‘waitsocket’:
sftp_write_sliding.c:59: error: #pragma GCC diagnostic not allowed inside functions
sftp_write_sliding.c:60: error: #pragma GCC diagnostic not allowed inside functions
sftp_write_sliding.c:64: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [sftp_write_sliding.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:10 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

ssh2_agent_forwarding.c: In function ‘waitsocket’:
ssh2_agent_forwarding.c:54: error: #pragma GCC diagnostic not allowed inside functions
ssh2_agent_forwarding.c:55: error: #pragma GCC diagnostic not allowed inside functions
ssh2_agent_forwarding.c:59: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [ssh2_agent_forwarding.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:11 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

ssh2_echo.c: In function ‘waitsocket’:
ssh2_echo.c:51: error: #pragma GCC diagnostic not allowed inside functions
ssh2_echo.c:52: error: #pragma GCC diagnostic not allowed inside functions
ssh2_echo.c:56: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [ssh2_echo.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:12 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

ssh2_exec.c: In function ‘waitsocket’:
ssh2_exec.c:55: error: #pragma GCC diagnostic not allowed inside functions
ssh2_exec.c:56: error: #pragma GCC diagnostic not allowed inside functions
ssh2_exec.c:60: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [ssh2_exec.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:13 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

tcpip-forward.c: In function ‘main’:
tcpip-forward.c:250: error: #pragma GCC diagnostic not allowed inside functions
tcpip-forward.c:251: error: #pragma GCC diagnostic not allowed inside functions
tcpip-forward.c:255: error: #pragma GCC diagnostic not allowed inside functions
tcpip-forward.c:265: error: #pragma GCC diagnostic not allowed inside functions
tcpip-forward.c:266: error: #pragma GCC diagnostic not allowed inside functions
tcpip-forward.c:270: error: #pragma GCC diagnostic not allowed inside functions
make[1]: *** [tcpip-forward.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libssh2/libssh2/work/libssh2-1.11.1/example'

comment:14 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Build, test, and upgrade succeeded with the following patch set.

Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Set of patches to make libssh 1.11 compile with GCC 4

comment:15 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

With the same set of patches it also built on PPC Tiger, Mac OS X 10.4.11: libssh2 @1.11.1_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2024-10-20T20:37:47+0200'.

comment:16 Changed 17 months ago by ballapete (Peter "Pete" Dyballa)

libssh2 @1.11.1_0 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2024-10-19T17:34:55+0200' is installed on PPC Leopard and this ticked can be closed.

Note: See TracTickets for help on using tickets.