Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#4719 closed defect (worksforme)

BUG: lftp build fail on 10.3.7

Reported by: nirs@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: yeled@…, markd@…
Port:

Description

I get few errors while building lftp:

---> Building lftp with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_net_lftp/work/ lftp-3.3.0" && make all" returned error 2 Command output: ../include/triodef.h:138: warning: To disable this warning, use

-Wno-long-double.)

if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT lftp_rl.o -MD -MP -MF ".deps/lftp_rl.Tpo" -c -o lftp_rl.o lftp_rl.c; \ then mv -f ".deps/lftp_rl.Tpo" ".deps/lftp_rl.Po"; else rm -f ".deps/lftp_rl.Tpo"; exit 1; fi lftp_rl.c: In function `lftp_rl_init': lftp_rl.c:165: warning: assignment from incompatible pointer type if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT getdate.o -MD -MP -MF ".deps/getdate.Tpo" -c -o getdate.o getdate.c; \ then mv -f ".deps/getdate.Tpo" ".deps/getdate.Po"; else rm -f ".deps/getdate.Tpo"; exit 1; fi getdate.y: In function `gd_error': getdate.y:645: warning: implicit declaration of function `xfree' /bin/sh ../libtool --silent --tag=CXX --mode=link gcc -O2 -Wall -Wwrite-strings -Woverloaded- virtual -fno-exceptions -fno-rtti -fno-implement-inlines -Winline -o lftp -export-dynamic lftp.o complete.o lftp_rl.o getdate.o liblftp-jobs.la liblftp-tasks.la liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la cmd-mirror.la cmd-sleep.la ../readline-4.3/ libreadline.a ../lib/liblib.a -lexpat -L/opt/local/lib -lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -L/opt/local/lib -liconv -R/opt/local/lib -lcurses -lresolv -lsupc++ ld: warning -L: directory name (/opt/local/lib/lftp/3.3.0) does not exist ld: warning prebinding disabled because dependent library: /usr/local/lib/libexpat.0.dylib is not prebound ld: multiple definitions of symbol _getopt /usr/lib/libc.dylib(getopt.So) definition of _getopt ../lib/liblib.a(getopt.o) definition of _getopt in section (TEXT,text) ld: multiple definitions of symbol _opterr /usr/lib/libc.dylib(getopt.So) definition of _opterr ../lib/liblib.a(getopt.o) definition of _opterr in section (DATA,data) ld: multiple definitions of symbol _optind /usr/lib/libc.dylib(getopt.So) definition of _optind ../lib/liblib.a(getopt.o) definition of _optind in section (DATA,data) ld: multiple definitions of symbol _optopt /usr/lib/libc.dylib(getopt.So) definition of _optopt ../lib/liblib.a(getopt.o) definition of _optopt in section (DATA,data) ld: warning multiple definitions of symbol _locale_charset /opt/local/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /opt/local/lib/libintl.dylib(localcharset.o) definition of _locale_charset make[1]: * [lftp] Error 1 make: * [all-recursive] Error 1

I run 10.3.7 and can't use 10.3.9 since disk images are broken on that version :-(

Attachments (1)

install-failure.zip (11.5 KB) - added by nirs@… 15 years ago.
output from debug build

Download all attachments as: .zip

Change History (27)

comment:1 Changed 16 years ago by yeled@…

Status: newassigned

comment:2 Changed 16 years ago by nirs@…

I just compiled lftp 3.3.0 from source. It compiles with many warnings, but no errors, and seems to run fine.

Why the dp version, which is also 3.3.0 does not compile?

comment:3 Changed 16 years ago by toby@…

Works for me on 10.4.2. I'll try to track down a Panther box later...

comment:4 Changed 16 years ago by yeled@…

Cc: yeled@… added

comment:5 Changed 15 years ago by mww@…

Summary: lftp build fail on 10.3.7BUG: lftp build fail on 10.3.7

comment:6 Changed 15 years ago by markd@…

Cc: markd@… added

(In reply to comment #2)

Works for me on 10.4.2. I'll try to track down a Panther box later...

I just installed it cleanly on two different 10.3 boxes. This should be closed.

comment:7 Changed 15 years ago by blb@…

Resolution: fixed
Status: assignedclosed

Resolving per markd@'s comment.

comment:8 Changed 15 years ago by nirs@…

I still get an error when building lftp, now on 10.3.9. I'm using version 3.3.4 I built from the original tarball in /usr/local with no problem.

$ sudo port install lftp ---> Fetching lftp ---> Verifying checksum(s) for lftp ---> Extracting lftp ---> Applying patches to lftp ---> Configuring lftp ---> Building lftp with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_net_lftp/work/lftp-3.3.5" && make all" returned error 2 Command output: ../include/triodef.h:138: warning: To disable this warning, use

-Wno-long-double.)

if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT lftp_rl.o -MD -MP -MF ".deps/lftp_rl.Tpo" -c -o lftp_rl.o lftp_rl.c; \ then mv -f ".deps/lftp_rl.Tpo" ".deps/lftp_rl.Po"; else rm -f ".deps/lftp_rl.Tpo"; exit 1; fi lftp_rl.c: In function `lftp_rl_init': lftp_rl.c:165: warning: assignment from incompatible pointer type if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT getdate.o -MD -MP -MF ".deps/getdate.Tpo" -c -o getdate.o getdate.c; \ then mv -f ".deps/getdate.Tpo" ".deps/getdate.Po"; else rm -f ".deps/getdate.Tpo"; exit 1; fi getdate.y: In function `gd_error': getdate.y:645: warning: implicit declaration of function `xfree' /bin/sh ../libtool --silent --tag=CXX --mode=link gcc -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -Winline -o lftp -export-dynamic lftp.o complete.o lftp_rl.o getdate.o liblftp-jobs.la liblftp-tasks.la liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la cmd-mirror.la cmd-sleep.la ../readline-4.3/libreadline.a ../lib/liblib.a -lexpat -L/opt/local/lib -lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -L/opt/local/lib -liconv -R/opt/local/lib -lcurses -lresolv -lsupc++ ld: warning -L: directory name (/opt/local/lib/lftp/3.3.5) does not exist ld: warning prebinding disabled because dependent library: /usr/local/lib/libexpat.0.dylib is not prebound ld: multiple definitions of symbol _getopt /usr/lib/libc.dylib(getopt.So) definition of _getopt ../lib/liblib.a(getopt.o) definition of _getopt in section (TEXT,text) ld: multiple definitions of symbol _opterr /usr/lib/libc.dylib(getopt.So) definition of _opterr ../lib/liblib.a(getopt.o) definition of _opterr in section (DATA,data) ld: multiple definitions of symbol _optind /usr/lib/libc.dylib(getopt.So) definition of _optind ../lib/liblib.a(getopt.o) definition of _optind in section (DATA,data) ld: multiple definitions of symbol _optopt /usr/lib/libc.dylib(getopt.So) definition of _optopt ../lib/liblib.a(getopt.o) definition of _optopt in section (DATA,data) ld: warning multiple definitions of symbol _locale_charset /opt/local/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /opt/local/lib/libintl.dylib(localcharset.o) definition of _locale_charset make[1]: * [lftp] Error 1 make: * [all-recursive] Error 1

Error: /opt/local/bin/port: Status 1 encountered during processing.

$ port installed The following ports are currently installed:

apache2 @2.0.54_1+darwin_7 apr @0.9.6_1 apr-util @0.9.6_1 arch @1.3.3_0 aspell @0.60.2_2 aspell-dict-en @6.0_0 autobook @1.4_0 autoconf @2.59_0 autogen @5.8.1_0 automake @1.9.6_0 bazaar @1.4.2_0 bazaar @1.4.2_0+darwin_7 bazaar-ng @0.7_0 bzip2 @1.0.3_0 class-dump @3.0_0 DarwinPortsStartup @1.1_0 db4 @4.3.28_0+darwin_7 diffutils @2.8.1_0 expat @1.95.8_1 findutils @4.2.20_0 fondu @040925_0 freetype @2.1.9_1 gettext @0.14.5_0 gnupg @1.4.2_0 gpatch @2.5.9_0 gpgme @1.0.3_0+darwin_7 guile @1.6.7_0 jpeg @6b_1 libgpg-error @1.0_0 libiconv @1.10_0 libpng @1.2.8_2 libtool @1.5.20_0 libtool-devel @1.9f_0 libxml2 @2.6.22_0 lighttpd @1.4.9_0 links @2.1pre18_0 mod_fastcgi @2.4.2_0 mzscheme @209_0 neon @0.25.5_0 openmcl @1.0_0 openssl @0.9.8_1 pcre @6.4_0 pth @2.0.0_1 py-celementtree @1.0.2-20050302_0 py-crypto @2.0.1_0 py-docutils @0.3.7_0 py-elementtree @1.2.6-20050316_0 py-paramiko @1.5.2_0 py-pil @1.1.5_1 py-pyobjc @1.3.7_0 py-twisted @2.1.0_0 py-twistedweb @0.5.0_0 py-zopeinterface @3.0.1_0 python24 @2.4.2_2 readline @5.0.005_0 sloccount @2.26_0 tidy @20050920_0 wget @1.10.2_0 zlib @1.2.3_0

comment:9 Changed 15 years ago by markd@…

Please send full debug output. Do this:

port clean --all lftp port -vd install lftp

stick the output text in a file and attach it

comment:10 Changed 15 years ago by markd@…

Also, lftp is up to version 3.3.5 now. I see you originally had the problem with 3.3.0. You've done a port selfupdate correct? It should be trying to install lftp 3.3.5.

Changed 15 years ago by nirs@…

Attachment: install-failure.zip added

output from debug build

comment:11 Changed 15 years ago by markd@…

(In reply to comment #8)

Created an attachment (id=7088) [edit] output from debug build

Looks like you have an old version of expat and it may be involved. You have 1.95.8 and the latest is 2.0.0. Though it isn't needed for lftp, something you have needs it so try upgrading it. Try this:

port selfupdate (you already did this but just for completeness) port -f uninstall expat port clean --all expat port install expat port clean --all lftp port -vd install lftp

If that doesn't work, try removing xpat and try installing lftp without it, then reinstall xpat afterwards.

comment:12 Changed 15 years ago by nirs@…

Resolution: fixed
Status: closedreopened

Removing expat before installing lftp did solve the problem.

However this bug is not resolved until lftp install cleanly even when expat is installed.

comment:13 Changed 15 years ago by nirs@…

(In reply to comment #10)

Removing expat before installing lftp did solve the problem.

Jut to make it clear, upgrading exapt to 2.0.0 was not enough and I got the same error. I had to uninstall it before installing lftp, then install expat.

comment:14 Changed 15 years ago by markd@…

(In reply to comment #10)

Removing expat before installing lftp did solve the problem.

However this bug is not resolved until lftp install cleanly even when expat is installed.

I forgot to mention that lftp works fine for me on 10.3.8 even with expat. I only saw that expat was causing a problem for you because of your debug output. I still cannot duplicate this problem on 10.3 using expat. Even with expat installed I get:

checking for XML_ParserCreateNS in -lexpat... no

you get:

checking for XML_ParserCreateNS in -lexpat... yes

I'm guessing you have some manually installed libraries causing trouble but I don't know which or how to tell you to fix it. I mailed the lftp mailing list; if they don't have any suggestions I'll have to mark this as "works for me" since lftp does install cleanly with expat. A specific answer to every problem is not always possible. If you were to choose a clean 10.3 box to install lftp I'll bet you'd have no problems.

comment:15 Changed 15 years ago by nirs@…

How manually installed libraries cause trouble only when darwinports expat is installed, and does not cause any trouble when it is not installed?

I'll try to rename my current /opt and install a new copy to make sure its not something I change in the /opt tree.

One fact I forgot to mention is that I use "portinstalltype direct" in /opt/local/etc/ports/ports.conf, to avoid using hardlinks, which are prety broken on 10.3. I don't see how it may effect this problem.

comment:16 Changed 15 years ago by markd@…

(In reply to comment #13)

How manually installed libraries cause trouble only when darwinports expat is installed, and does not cause any trouble when it is not installed?

What do you get for this configure line:

checking for expat.h...

when installing with xpat uninstalled? Does it say 'yes' or 'no'?

comment:17 Changed 15 years ago by nirs@…

After I uninstall expat port and run port install lftp, I get:

checking for XML_ParserCreateNS in -lexpat... yes checking for expat.h... yes

I have expat installed in /usr/local, but I guess it should not effect darwinports installations.

comment:18 Changed 15 years ago by danielluke (Daniel J. Luke)

(In reply to comment #15)

I have expat installed in /usr/local, but I guess it should not effect darwinports installations.

You guess wrong (probably).

/usr/local/lib and /usr/local/include are in gcc's default search paths.

You can see this behavior for yourself too:

$echo 'main(){}' | gcc -v -E - | less

comment:19 Changed 15 years ago by markd@…

Resolution: worksforme
Status: reopenedclosed

So you have 2 versions of expat installed; you remove one and it works. So remove the non-DP version; re-install the DP version and it should be fine since it is fine on more than one 10.3 box for me. The two versions are conflicting.

comment:20 Changed 15 years ago by nirs@…

I don't see the conflict here. I can install lftp by removing darwinports expat, and then install it again. Its just a build problem of lftp. Note that there is no problem to build lftp from sources, with darwinports expat installed on not.

comment:21 Changed 15 years ago by markd@…

(In reply to comment #18)

I don't see the conflict here. I can install lftp by removing darwinports expat, and then install it again. Its just a build problem of lftp. Note that there is no problem to build lftp from sources, with darwinports expat installed on not.

Yes but a test is only valid insofar as it duplicates the conditions of the failed case and I think you may not have by testing with a manual install of the same app. You'd have to duplicate the build environment that Dp provides as well. I'm not sure why you are determined to ignore the best empirical evidence we have: the debug output showing "multiple definitions". But I'm pretty sure that if you would remove the manual expat install you'd know for sure. If that does solve it then finding a sufficiently clear explanation could come later (I'd give you a better one if I could) but it isn't as important as knowing how to avoid it since there is never a guarantee that multiple versions of a piece of software will work. So I think the most imporant thing is whether not not it is true that two versons of expat is the problem, not whether you are satisfied with the explanations we've given so far, and that is best proved by experimentation -i. e. yanking your 1st install of expat and trying an install of the DP version of lftp. That would seem to me to be the most valid test. I certainly hope that works, but to be honest there isn't much I could do if it didn't since we just can't troubleshoot your machine. I wiped my who DP infrastructure (/opt/local) last week just to be sure I'd have a clean environment because there are some problems that are nearly impossible to troubleshoot. And I don't install Unix software manually (I go all DP now) because I know that if I do manual installs, wiping /opt/local won't give me a clean install anymore because I'll still have files scattered outside of /opt/local with no way to remove them without removing Apple's stuff along with it and compromising my OS. So I hope you see the complexity of the problem and I hope you understand that we're doing the best we can to try to help.

comment:22 Changed 15 years ago by nirs@…

I'll try to install a clean darwinports tree, to make sure the problems is caused by the /usr/local installed expat.

How should I remove the local expat? remove the libraries in /usr/local/lib and the headers in /usr/local/include?

comment:23 Changed 15 years ago by nirs@…

I renamed my old darwinports to /opt-old, and and installed fresh darwinports 1.2. I did not touch my /user/local install of expat.

I tried these tests: Install lftp on a fresh copy:

  1. port install lftp

ok

Install with expat installed:

  1. port uninstall lftp
  2. port clean --all lftp
  3. port install expat
  4. port intall lftp

ok

It seems that the problems I had are cause by something in my old darwinports install - I don't have any idea what.

I'll try next to reinstall all the other packages I had and then try again to install lftp.

comment:24 Changed 15 years ago by nirs@…

I installed the rest of packages I need: apache2 arch aspell aspell-dict-en bazaar-ng class-dump DarwinPortsStartup gnupg links mod_fastcgi mzscheme openmcl py-celementtree py-crypto py-docutils py-elementtree py-paramiko py-pil py-pyobjc py-twisted py-twistedweb python24 sloccount tidy wget

And now I get the same error I got before when I try to install lftp:

# port clean --all lftp ---> Cleaning lftp

# port install lftp ---> Fetching lftp ---> Attempting to fetch lftp-3.3.5.tar.bz2 from ftp://ftp.wiretapped.net/pub/mirrors/lftp/ ---> Verifying checksum(s) for lftp ---> Extracting lftp ---> Applying patches to lftp ---> Configuring lftp ---> Building lftp with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_net_lftp/work/lftp-3.3.5" && make all" returned error 2 Command output: ../include/triodef.h:138: warning: To disable this warning, use

-Wno-long-double.)

if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT lftp_rl.o -MD -MP -MF ".deps/lftp_rl.Tpo" -c -o lftp_rl.o lftp_rl.c; \ then mv -f ".deps/lftp_rl.Tpo" ".deps/lftp_rl.Po"; else rm -f ".deps/lftp_rl.Tpo"; exit 1; fi lftp_rl.c: In function `lftp_rl_init': lftp_rl.c:165: warning: assignment from incompatible pointer type if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I/opt/local/include -O2 -Wall -MT getdate.o -MD -MP -MF ".deps/getdate.Tpo" -c -o getdate.o getdate.c; \ then mv -f ".deps/getdate.Tpo" ".deps/getdate.Po"; else rm -f ".deps/getdate.Tpo"; exit 1; fi getdate.y: In function `gd_error': getdate.y:645: warning: implicit declaration of function `xfree' /bin/sh ../libtool --silent --tag=CXX --mode=link gcc -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -Winline -o lftp -export-dynamic lftp.o complete.o lftp_rl.o getdate.o liblftp-jobs.la liblftp-tasks.la liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la cmd-mirror.la cmd-sleep.la ../readline-4.3/libreadline.a ../lib/liblib.a -lexpat -L/opt/local/lib -lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -L/opt/local/lib -liconv -R/opt/local/lib -lcurses -lresolv -lsupc++ ld: warning -L: directory name (/opt/local/lib/lftp/3.3.5) does not exist ld: warning prebinding disabled because dependent library: /usr/local/lib/libexpat.0.dylib is not prebound ld: multiple definitions of symbol _getopt /usr/lib/libc.dylib(getopt.So) definition of _getopt ../lib/liblib.a(getopt.o) definition of _getopt in section (TEXT,text) ld: multiple definitions of symbol _opterr /usr/lib/libc.dylib(getopt.So) definition of _opterr ../lib/liblib.a(getopt.o) definition of _opterr in section (DATA,data) ld: multiple definitions of symbol _optind /usr/lib/libc.dylib(getopt.So) definition of _optind ../lib/liblib.a(getopt.o) definition of _optind in section (DATA,data) ld: multiple definitions of symbol _optopt /usr/lib/libc.dylib(getopt.So) definition of _optopt ../lib/liblib.a(getopt.o) definition of _optopt in section (DATA,data) ld: warning multiple definitions of symbol _locale_charset /opt/local/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /opt/local/lib/libintl.dylib(localcharset.o) definition of _locale_charset make[1]: * [lftp] Error 1 make: * [all-recursive] Error 1

Error: /opt/local/bin/port: Status 1 encountered during processing.

So it is related to one the packages above.

comment:25 Changed 15 years ago by markd@…

I just installed all the ports you listed on my 10.3 box that weren't on there already and it still installs with no problems. At this point I'm not even so confident that it the usr/local copy of expat. All I can say is that on my boxes all the DP apps you have co-exist peacefully. This is the major reason to use a package manager exclusively for Unix apps because all apps are quarantined (and tracked). The only way to solve difficult problems is by not ruling anything out. But if you want to try removing expat, look for the same files that are in DP's expat but in /usr/lib (I think) and rename them. It's worth a try but the only other thing to do is confirm for yourself on another 10.3 that has no Unix apps manually installed that it all works. If it does, as it does for me, then it is archive and install city. I know of no better way.

comment:26 Changed 15 years ago by markd@…

Ok, so here's an idea. Edit:

/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/net/lft/Portfile

And add these items to your configure.args:

CPPFLAGS=-I${prefix}/include \ CFLAGS=-I${prefix}/include \ LDFLAGS=-L${prefix}/lib

You'll need to add a slash to the last line in the current configure.args statement. So every configure.arg line should have a slash but the last one. See if that takes care of it. That may make it ignore the other version of expat. If that works for you I can add it to the lftp port. But since I don't have the problem here I won't be able to tell.

Note: See TracTickets for help on using tickets.