DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 15th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default NetBSD - ldconfig, ld cache

hi, all.
some days ago I found emacs extension - auto-complete-clang-async - for C/C++ autocomplete with LLVM backend. I build and install clang from pkgsrc, but when I try to build this extension with make tool, I encountered with several problems:

1) libc++.so - standard c++ library for clang++ isn't represented in system, not in /usr/lib, /usr/pkg/lib paths;

2) I can't find ldconfig(8) in my system for create libraries links cache, however there are man page for it. 'locate libclang.so' and 'locate libc++.so' shows nothing and I think ld(1) don't know about clang libraries.

thnx.

sorry for my english, I need more practice
Reply With Quote
  #2   (View Single Post)  
Old 15th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default

I forgot: NetBSD 6.1.2 amd64, pkgsrc stable.
Reply With Quote
  #3   (View Single Post)  
Old 15th April 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by kaludis View Post
hi, all.
Hi, and welcome to the forum!

Quote:
2) I can't find ldconfig(8) in my system for create libraries links cache, however there are man page for it. 'locate libclang.so' and 'locate libc++.so' shows nothing and I think ld(1) don't know about clang libraries.
I must begin by saying I'm not familiar with clang, and only use pkgsrc binary packages, but with that in mind, a couple of thoughts for you to follow up on:

I would expect to find ldconfig at /sbin/ldconfig. Is this not there on your system? It is part of the base.tgz package.

I downloaded the clang-3.4nb1.tgz binary package to a shell account. It doesn't seem to contain libc++.so, but there is a libclang.so that I expect would be installed as /usr/pkg/lib/libclang.so. Did your pkgsrc compilation of clang install that?
Reply With Quote
  #4   (View Single Post)  
Old 15th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default

thnx for your reply!

I installed clang package from source with 'make install clean' and found clang binary and clang++ symbol link in /usr/pkg/bin path. llvm-* binaries installed too.

Already I checked ldconfig location in /sbin, that there is no. NetBSD was installed with full configuration (base, compile tools, x11, etc.). may be certain package contains this util?
Reply With Quote
  #5   (View Single Post)  
Old 15th April 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by kaludis View Post
I installed clang package from source with 'make install clean' and found clang binary and clang++ symbol link in /usr/pkg/bin path. llvm-* binaries installed too.
Did it also install /usr/pkg/lib/libclang.so ?

Quote:
Already I checked ldconfig location in /sbin, that there is no. NetBSD was installed with full configuration (base, compile tools, x11, etc.). may be certain package contains this util?
Sorry, my mistake, it seems for amd64 there is no ldconfig (but there is still for i386). But, you probably don't need it as the man page ldconfig(8) says that for ELF systems ld.elf_so(1) is used instead. Perhaps the information in these man pages will be helpful?
Reply With Quote
  #6   (View Single Post)  
Old 15th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default

yes, libclang.so located in /usr/pkg/lib/, it is correct. now I'll try to use llvm-config for automatic definitions paths and libraries for clang.

you're right, I casually read man page for ldconfig.

deviate from the topic, do you used pkgsrc-wip project for build virtualbox? actually, I have some quetsions in point of wip. should I create new thread for it?
Reply With Quote
  #7   (View Single Post)  
Old 15th April 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by kaludis View Post
yes, libclang.so located in /usr/pkg/lib/, it is correct. now I'll try to use llvm-config for automatic definitions paths and libraries for clang.
Sounds good that the library is there, I hope the rest will work.

Quote:
you're right, I casually read man page for ldconfig.
The man pages are excellent sources of info, always worth reading. And yes sometimes we all forget to do that.

Quote:
deviate from the topic, do you used pkgsrc-wip project for build virtualbox? actually, I have some quetsions in point of wip. should I create new thread for it?
No, I've never used virtualbox myself, and I only use binary packages. Yes it would be good to create a new thread for this, as it helps people who may search for a topic find focused information. So don't be shy to create a new thread.
Reply With Quote
  #8   (View Single Post)  
Old 16th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default

thnx for your help!
Reply With Quote
  #9   (View Single Post)  
Old 20th April 2014
kaludis's Avatar
kaludis kaludis is offline
Real Name: Alexander Bezsilko
Port Guard
 
Join Date: Apr 2014
Location: Russia
Posts: 10
Default

o'k. I solved my problem as folllows:

current version of clang is 3.4. This version contain problem with absence libc++.so that implement clang STL after installing. I just installed a previous version clang-3.3 with pkg_add -v and now all libraries and paths are set correctly. I found bug reports about clang-3.4 and believe that error will be fixed soon.
Reply With Quote
Reply

Tags
clang, emacs, netbsd

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
WordPress cache plugins enabled remote PHP execution J65nko News 0 25th April 2013 07:29 AM
Manage Unreal Tournament cache files Carpetsmoker Guides 0 24th June 2010 10:11 PM
improve proxy cache and replace gif MIME milo974 OpenBSD General 1 10th July 2008 12:14 PM
Memory cache graudeejs FreeBSD General 3 9th July 2008 03:27 AM
in how many min/sec arp cache gets cleared in freebsd rex FreeBSD General 1 9th May 2008 08:01 AM


All times are GMT. The time now is 04:05 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