Bug #653

/proc/self/exe is detected in build sytem, but target sytem may not support it.

Added by Carlo Bramini 7 months ago. Updated 7 months ago.

Status:Closed Start date:July 30, 2016
Priority:Minor Due date:
Assignee:- % Done:

100%

Category:libaudcore
Target version:3.8
Affects version:

Description

Hello,
when building with MINGW, I got an error because readlink() function did not exist.
This happens because configure script detects /proc/self/exe presence without checking if the host and build platforms are the same.
So, if you are cross compiling, /proc/self/exe may not exist on target platform and later this could cause an error when building.
Perhaps you may find interesting the way it has been implemented the detection of /proc/self/exe in the build scripts of GNUC, see for example this:

https://github.com/gcc-mirror/gcc/blob/master/libjava/configure.ac#L1181

Hope you will find it useful.

Sincerely.

Associated revisions

Revision 6f53a269
Added by John Lindgren 7 months ago

Check linux to determine if /proc/self/exe is available. Closes: #653.

History

#1 Updated by John Lindgren 7 months ago

  • % Done changed from 0 to 100
  • Target version set to 3.8
  • Status changed from New to Closed
  • Category set to libaudcore

I agree, checking for /proc/self/exe on the host system is not the right way. We should just check for the __linux__ macro. If we do end up running on a system without /proc mounted, the readlink() call will just fail, with no harm done.

Also available in: Atom PDF