delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/14/13:01:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_40,SARE_SUB_ENC_UTF8
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Thu, 14 Jan 2010 19:01:42 +0100
From: "Vincent R." <forumer AT smartmobili DOT com>
To: <cygwin AT cygwin DOT com>
Subject: dladdr and =?UTF-8?Q?Dl=5Finfo?=
Message-ID: <3ab31ceedb33b3519257e07931dbdaf5@mail.smartmobili.com>
X-Sender: forumer AT smartmobili DOT com
User-Agent: RoundCube Webmail/0.2
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi,

I am trying to compile llvm on latest cygwin and I get an error about
missing
definitions for Dl_info and dladdr.

const llvm::sys::Path& CIndexer::getClangPath() {
  // Did we already compute the path?
  if (!ClangPath.empty())
    return ClangPath;

  // Find the location where this library lives (libCIndex.dylib).
#ifdef LLVM_ON_WIN32
  ...
#else
  // This silly cast below avoids a C++ warning.
  Dl_info info;
  if (dladdr((void *)(uintptr_t)clang_createTranslationUnit, &info) == 0)
    assert(0 && "Call to dladdr() failed");

  llvm::sys::Path CIndexPath(info.dli_fname);

  // We now have the CIndex directory, locate clang relative to it.
  CIndexPath.eraseComponent();
  CIndexPath.eraseComponent();
  CIndexPath.appendComponent("bin");
  CIndexPath.appendComponent("clang");
#endif

  // Cache our result.
  ClangPath = CIndexPath;
  return ClangPath;
}

Could it be possible to provide an implementation ?

Thanks




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019