Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344509

Summary: TCF Agent isn't buildable for uclibc-based toolchains
Product: [Tools] TCF Reporter: Peder Andersen <Peder.Andersen>
Component: AgentAssignee: Project Inbox <tcf.agent-inbox>
Status: RESOLVED FIXED QA Contact: Eugene Tarassov <eugene>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: unspecified   
Target Milestone: 0.4.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix for missing APIs.
eugene: iplog+
Fix allowing builds in uuid-less environments eugene: iplog+

Description Peder Andersen CLA 2011-05-02 16:34:25 EDT
Created attachment 194542 [details]
Fix for missing APIs.

Some APIs provided by glibc are not available for uclibc-based targets, so we can provide implementations of these using mdep.c.

The second issue is that libuuid does not yet support being built for uclibc targets, so we should provide a method for linux clients to not be forced to link against this library.

See attached for patches for both issues, based on SVN version 1617.
Comment 1 Peder Andersen CLA 2011-05-02 16:35:28 EDT
Created attachment 194543 [details]
Fix allowing builds in uuid-less environments
Comment 2 Eugene Tarassov CLA 2011-05-02 19:29:06 EDT
I have some doubts about the first patch: it changes realpath() to use NULL as the buffer pointer. NULL support was added relatively recently - in 2008 issue of IEEE standard, and it is not consistently supported everywhere. I would not use it without checking libc version with #if/#endif.
Comment 3 Peder Andersen CLA 2011-05-02 19:39:22 EDT
I didn't test builds for *BSD or apple, just optimized for them as well based on the 4.4BSD & POSIX.1-2001 documentation.  You could always use the original implementation for these platforms and just add the optimized canonicalize_file_name() for uclibc platforms.
Comment 4 Eugene Tarassov CLA 2011-06-03 10:01:41 EDT
I have committed the patches with a minor change: the original implementation of canonicalize_file_name() is used for BSD.
Thanks!