New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #22224 (closed defect: fixed)

Opened 4 years ago

Last modified 12 months ago

libssh2-1.2.1 ppc Make error - syntax error near unexpected token `|'

Reported by: trevordevore@… Owned by: pmq@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: iamgnat@…, ryandesign@…, egall@…
Port: libssh2

Description (last modified by ryandesign@…) (diff)

I'm trying to build libssh2 as a universal binary. I'm running 10.5.8 on intel with XCode 3.1.2. The i386 build seems to work fine. During the PPC build the make process encounters an error. The first error reported is:

../libtool: eval: line 947: syntax error near unexpected token `|'

Previous to that error in the debug log I see that data is being piped into nothing:

.libs/pem.o   |  | /usr/bin/sed 's/.*

I'm guessing this is where the error is although I don't know much about the build process.

Attachments

libssh2.txt (65.5 KB) - added by trevordevore@… 4 years ago.
Debug Log

Change History

Changed 4 years ago by trevordevore@…

Debug Log

comment:1 Changed 4 years ago by toby@…

  • Owner changed from macports-tickets@… to pmq@…
  • Keywords libssh2 removed
  • Summary changed from libssh2-1.2.1 Make error - syntax error near unexpected token `|' to libssh2-1.2.1 ppc Make error - syntax error near unexpected token `|'

comment:2 Changed 4 years ago by iamgnat@…

I'm also seeing the same issue trying to build for 10.5.8 to get a ppc/i386/x86_64 universal build. I'm still digging (not much experience with libtool), but I found that the i386 and x86_64 libtool scripts have global_symbol_pipe set like:

global_symbol_pipe="sed -n -e 's/^.*[    ]\\([BCDEGRST][BCDEGRST]*\\)[   ][      ]*_\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 _\\2 \\2/p'"

While the PPC version is set to an empty string. This appears to be the bad value that is causing the dual pipes which in turn is causing the issue.

comment:3 follow-up: ↓ 5 Changed 4 years ago by iamgnat@…

Manually setting the PPC value to match the x86 values allowed the make to continue, but it still eventually fails as it does not find any symbols. Looking back, I came back to the same offending command and found that it was trying to use "link -dump -symbols" and link was complaining that "-d" is not a known option.

In poking around, I found this link about similar issues someone was having with glib (not in MacPorts): http://article.gmane.org/gmane.comp.gnu.libtool.bugs/6771

Modifying libssh2's Portfile to add "configure.env-append NM=/usr/bin/nm" appears to have let it built successfully (with all the appropriate universal platforms included).

# $Id: Portfile 58920 2009-10-07 09:43:21Z toby@macports.org $

PortSystem 1.0
PortGroup  muniversal 1.0

name              libssh2
version           1.2.1
categories        devel net
platforms         darwin
maintainers       pmq openmaintainer

description       libssh2 is a library implementing the SSH2 protocol
long_description  libssh2 is a library implementing the SSH2 protocol as \
                  defined by Internet Drafts: SECSH-TRANS(22), \
                  SECSH-USERAUTH(25), SECSH-CONNECTION(23), SECSH-ARCH(20), \
                  SECSH-FILEXFER(06), SECSH-DHGEX(04), and SECSH-NUMBERS(10).

license           BSD

homepage          http://www.libssh2.org/
master_sites      ${homepage}download/ sourceforge
checksums         md5 4ee0197947a3b8a4472328c346e1a0e4 \
                  sha1 fc5e66089340cce1cf03a8cfd75b6f15ed59d30c \
                  rmd160 12da32cc6a1f79dd3627037645b848f4bf1c7b20

depends_lib       port:openssl port:zlib

configure.env-append    NM=/usr/bin/nm

comment:4 Changed 4 years ago by iamgnat@…

  • Cc iamgnat@… added

Cc Me!

comment:5 in reply to: ↑ 3 Changed 4 years ago by ryandesign@…

  • Status changed from new to closed
  • Cc ryandesign@… added
  • Resolution set to fixed

Replying to iamgnat@…:

Modifying libssh2's Portfile to add "configure.env-append NM=/usr/bin/nm" appears to have let it built successfully

Thank you for the tip. There's a similar fix in pango already, and there used to be one in glib2 until it stopped using the muniversal portgroup recently.

I committed the fix in r61568, with the exception that I used NM="/usr/bin/nm -p" because that's what's used in pango and I presume Marcus had a reason for writing it that way.

comment:6 Changed 4 years ago by ryandesign@…

  • Description modified (diff)

comment:7 Changed 4 years ago by ryandesign@…

Hopefully now fixed for all ports in r70156.

comment:8 Changed 12 months ago by egall@…

  • Cc egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.