Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#22224 closed defect (fixed)

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 (Ryan Carsten Schmidt), cooljeanius (Eric Gallager)
Port: libssh2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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 (1)

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

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by trevordevore@…

Attachment: libssh2.txt added

Debug Log

comment:1 Changed 14 years ago by tobypeterson

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

comment:2 Changed 14 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 Changed 14 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 14 years ago by iamgnat@…

Cc: iamgnat@… added

Cc Me!

comment:5 in reply to:  3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

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 14 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Hopefully now fixed for all ports in r70156.

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.