Closed jeffsf closed 6 years ago
For anyone looking to resolve this prior to any possible patch or recompilation of newlib, the newlib source code for basename()
may be found at
https://github.com/projectgus/newlib-xtensa/
at newlib/libc/unix/basename.c
/* Copyright 2005 Shaun Jackman
* Permission to use, copy, modify, and distribute this software
* is freely granted, provided that this notice is preserved.
*/
See https://github.com/SuperHouse/esp-open-rtos/pull/571 for a newlib update that includes some of the code from libc/unix such as basename.
Confirmed resolved and both cases now compile and link
Thanks @ourairquality
Although
basename
is defined in<libgen.h>
and code is present in newlib, the build system fails to properly link, even with a trivial example.This is a recent pull and build of esp-open-sdk and a recent pull of esp-open-rtos. esp-open-sdk was built using the instructions found at https://github.com/SuperHouse/esp-open-rtos on a case-sensitive volume.
To replicate:
The same program and Makefile link with the GNU version as described using
Unfortunately, GNU licensing requirements do not make this a viable alternative.
Looking at what is built with
nm
It appears that the POSIX version is not included in libc