Bug 220747 - ftp/lftp: fails to build (powerpc64)
Summary: ftp/lftp: fails to build (powerpc64)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Some People
Assignee: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-15 18:39 UTC by Alan Braslau
Modified: 2017-07-16 12:45 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (martymac)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Braslau 2017-07-15 18:39:26 UTC
/bin/sh ../libtool --silent  --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H  -I. -I../lib  -I../lib -I../trio -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -D_THREAD_SAFE   -O2 -pipe -DLIBICONV_PLUG -isystem /usr/local/includ/bin/sh ../libtool --silent  --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H  -I. -I../lib  -I../lib -I../trio -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -D_THREAD_SAFE   -O2 -pipe -DLIBICONV_PLUG -isystem /usr/local/include -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -MT MirrorJob.lo -MD -MP -MF .deps/MirrorJob.Tpo -c -o MirrorJob.lo MirrorJob.cc
MirrorJob.cc: In member function 'void MirrorJob::HandleFile(FileInfo*)':
MirrorJob.cc:381: error: operands to ?: have different types 'xstring_c' and 'const xstring'
*** [MirrorJob.lo] Error code 1

make[4]: stopped in /usr/ports/ftp/lftp/work/lftp-4.8.0/src
1 error
e -fno-strict-aliasing  -DLIBICONV_PLUG -isystem /usr/local/include -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -MT MirrorJob.lo -MD -MP -MF .deps/MirrorJob.Tpo -c -o MirrorJob.lo MirrorJob.cc
MirrorJob.cc: In member function 'void MirrorJob::HandleFile(FileInfo*)':
MirrorJob.cc:381: error: operands to ?: have different types 'xstring_c' and 'const xstring'
*** [MirrorJob.lo] Error code 1

make[4]: stopped in /usr/ports/ftp/lftp/work/lftp-4.8.0/src
1 error


Note that powerpc64 (still) uses GCC 4.2.1

Alan
Comment 1 Andreas Tobler freebsd_committer 2017-07-15 20:45:06 UTC
Try this:
Index: Makefile
===================================================================
--- Makefile	(revision 445958)
+++ Makefile	(working copy)
@@ -57,6 +57,9 @@
 
 .include <bsd.port.pre.mk>
 
+.if ${ARCH} == powerpc64
+USE_GCC=yes
+.endif
 .if ${SSL_DEFAULT:Mopenssl-devel}
 BROKEN=		Does not build with openssl-devel
 .endif
Comment 2 Alan Braslau 2017-07-15 23:17:53 UTC
(In reply to Andreas Tobler from comment #1)

Adding USE_GCC=yes works.

Alan
Comment 3 commit-hook freebsd_committer 2017-07-16 12:44:52 UTC
A commit references this bug:

Author: martymac
Date: Sun Jul 16 12:44:13 UTC 2017
New revision: 446001
URL: https://svnweb.freebsd.org/changeset/ports/446001

Log:
  Fix build on powerpc64

  PR:		220747
  Submitted by:	Alan Braslau <braslau@free.fr>

Changes:
  head/ftp/lftp/Makefile
Comment 4 Ganael LAPLANCHE freebsd_committer 2017-07-16 12:45:31 UTC
Committed, thanks!