Opened 8 years ago

Closed 8 years ago

#51746 closed defect (fixed)

libedit @3.1: Undefined symbols _libedit_getline

Reported by: liuhj.86@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: tiger leopard snowleopard Cc: jmroot (Joshua Root)
Port: libedit

Description

--->  Attempting to fetch libedit-20160618-3.1.tar.gz from http://thrysoee.dk/editline/
--->  Verifying checksums for libedit                                           
--->  Extracting libedit
--->  Applying patches to libedit
--->  Configuring libedit
--->  Building libedit
Error: org.macports.build for port libedit returned: command execution failed
Error: Failed to install libedit
Please see the log file for port libedit for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libedit/libedit/main.log

Attachments (1)

main.log (48.3 KB) - added by liuhj.86@… 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by liuhj.86@…

Attachment: main.log added

comment:1 Changed 8 years ago by liuhj.86@…

Install python27 in leopard 10.5.6 failed, libedit is a dependency to be installed

Version 0, edited 8 years ago by liuhj.86@… (next)

comment:2 Changed 8 years ago by liuhj.86@…

Xcode 3.1.4, GCC 4.2.1

comment:3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: leopard added
Owner: changed from macports-tickets@… to mcalhoun@…
Summary: libedit @3.1 Building error - command execution failedlibedit @3.1: Undefined symbols _libedit_getline

Looks like the relevant error in the log is:

:info:build Undefined symbols:
:info:build   "_libedit_getline", referenced from:
:info:build       _el_source in el.o
:info:build       _history_w in history.o
:info:build       _history_w in history.o
:info:build       _history in historyn.o
:info:build       _history in historyn.o
:info:build ld: symbol(s) not found

comment:4 Changed 8 years ago by kenneth.f.cunningham@…

Getline appears to be unavailable until 10.7 or later.

I ran into a similar error with a different port using PPC on MacOSX 10.4 and fixed it successfully using the information here: <http://forums.macrumors.com/threads/unable-to-compile-c-program-with-getline-using-gcc.1308709/>, which sends you ultimately here < http://opensource.apple.com//source/cvs/cvs-42/cvs/lib/> for the missing functions.

There are two files, getline.c and getdelim.c, and their headers in that directory, that provide the missing functions.

There is also this fix <https://trac.macports.org/browser/trunk/dports/textproc/uni2ascii/files/patch-ascii2uni.c.diff?rev=73852> for a similar error.

You could try to modify history.c, historyn.c, and probably el.c to add in those functions, and see where that takes you.

Last edited 8 years ago by kenneth.f.cunningham@… (previous) (diff)

comment:5 in reply to:  4 Changed 8 years ago by liuhj.86@…

Replying to kenneth.f.cunningham@…:

Getline appears to be unavailable until 10.7 or later.

I ran into a similar error with a different port using PPC on MacOSX 10.4 and fixed it successfully using the information here: <http://forums.macrumors.com/threads/unable-to-compile-c-program-with-getline-using-gcc.1308709/>, which sends you ultimately here < http://opensource.apple.com//source/cvs/cvs-42/cvs/lib/> for the missing functions.

There are two files, getline.c and getdelim.c, and their headers in that directory, that provide the missing functions.

There is also this fix <https://trac.macports.org/browser/trunk/dports/textproc/uni2ascii/files/patch-ascii2uni.c.diff?rev=73852> for a similar error.

You could try to modify history.c, historyn.c, and probably el.c to add in those functions, and see where that takes you.

Thanks a lot. I'll modify el.c and el.h, then have a test.

comment:6 Changed 8 years ago by liuhj.86@…

--->  Fetching distfiles for libedit
--->  Attempting to fetch libedit-20160618-3.1.tar.gz from http://cjj.kr.distfiles.macports.org/libedit
--->  Verifying checksums for libedit                                           
--->  Extracting libedit
--->  Applying patches to libedit
--->  Configuring libedit
--->  Building libedit
--->  Staging libedit into destroot
--->  Installing libedit @20160618-3.1_0
--->  Activating libedit @20160618-3.1_0
--->  Cleaning libedit
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found. 

I just try to install libedit again to see where el.c and el.h is, but the errors gone. This time the archive fetched from "http://cjj.kr.distfiles.macports.org/libedit", and last time the archive fetched from "http://thrysoee.dk/editline/".

comment:7 Changed 8 years ago by kenneth.f.cunningham@…

I note there is an official getline replacement in the port now, added 4 days ago. It must have been rolling out when you first tried your build.

comment:8 in reply to:  7 Changed 8 years ago by liuhj.86@…

Replying to kenneth.f.cunningham@…:

I note there is an official getline replacement in the port now, added 4 days ago. It must have been rolling out when you first tried your build.

It's OK. Thanks!

comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmr@… added
Keywords: tiger snowleopard added
Resolution: fixed
Status: newclosed

So I guess r149803 fixed this.

Note: See TracTickets for help on using tickets.