Project

General

Profile

Bug #653

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

Added by Carlo Bramini over 8 years ago. Updated over 8 years ago.

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

100%

Estimated time:
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.

History

#1 Updated by John Lindgren over 8 years ago

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

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