DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th November 2017
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default missing package(s) error

Code:
CMakeFiles/sdcv.dir/src/readline.cpp.o:(.data.rel.ro.local+0x30): undefined reference to `_ZL22__gthrw_pthread_cancelP7pthread'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetnum'
/usr/lib/libreadline.so.4.0: undefined reference to `tgoto'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetflag'
/usr/lib/libreadline.so.4.0: undefined reference to `tputs'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetent'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetstr'
collect2: error: ld returned 1 exit status
Does it mean i am missing some package(s) ?

Regards!
Reply With Quote
  #2   (View Single Post)  
Old 17th November 2017
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

During link phase, the list of functions encountered cannot be resolved by the linker. I suspect that some library is expected, but is not found.
Reply With Quote
  #3   (View Single Post)  
Old 17th November 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

readline must be linked with ncurses.
On the actual compiler command that gave the error, you'll see
Code:
-lreadline
which must be changed to
Code:
-lreadline -lncurses
Reply With Quote
  #4   (View Single Post)  
Old 17th November 2017
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default

Quote:
Originally Posted by ibara View Post
readline must be linked with ncurses.
On the actual compiler command that gave the error, you'll see
Code:
-lreadline
which must be changed to
Code:
-lreadline -lncurses
After adding "-lncurses" in link.txt manually, there is only one undefined reference:
Code:
CMakeFiles/sdcv.dir/src/readline.cpp.o:(.data.rel.ro.local+0x30): undefined reference to `_ZL22__gthrw_pthread_cancelP7pthread'
I tried "-lpthread", but it didnot work.
Code:
$ find /usr/lib -name "libpthread*"   
/usr/lib/libpthread.so.24.0
/usr/lib/libpthread.a
/usr/lib/libpthread_p.a

$nm -g /usr/lib/libpthread.a | grep -i pthread_cancel                                                                                           
00000a60 T pthread_cancel
Regards!

Last edited by sw2wolf; 18th November 2017 at 12:20 AM.
Reply With Quote
  #5   (View Single Post)  
Old 21st November 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by sw2wolf View Post
I tried "-lpthread", but it didnot work.
-pthread
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error: [drm:pid60567:intel_uncore_check_errors] *ERROR* Unclaimed register before int livestradamus OpenBSD Installation and Upgrading 11 4th November 2017 12:35 PM
shc unistd.h:239: error: syntax error before '&' token laraaj OpenBSD General 3 11th September 2010 07:21 AM
faac-1.28 binary package missing IdOp NetBSD Package System (pkgsrc) 0 20th August 2010 12:04 AM
Package install error. delboy FreeBSD Ports and Packages 10 25th March 2009 05:54 PM
"No package available in the PKG_PATH" error Nk2Network OpenBSD Packages and Ports 19 12th January 2009 09:22 PM


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick