configure: source_link doesn't work when building ffmpeg in Chromium using cygwin on Windows
|Reported by:||Xiaohan Wang||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
In the last chromium ffmpeg roll, I am getting issues on Windows when using cygwin.
The error messages are like:
c1 : fatal error C1083: Cannot open source file: 'src/libavformat/allformats.c': No such file or directory
After digging a bit, I found that this is because we make a symbol link "src", and then point "source_link" to it.
The logic around this in configure is as follows:
|[ -L src ]) && [ -e "$link_name/test_file" ]; then|
# create link to source path
[ -e src ] && rm src
$ln_s "$source_path" src
When we run this part of code, we are in a subfolder like "ffmpeg/build.ia32.win/Chromium", the symbol link "src" is created as expected. But it seems a path like "src/libavformat/allformats.c" doesn't work.
I suspected that maybe when we build we are not in "ffmpeg/build.ia32.win/Chromium", so we can't find "src". To test that, I hacked the script a bit to make the "source_link" an absolute path:
But I am still getting an error like:
c1 : fatal error C1083: Cannot open source file: 'd:/ffmpeg-tmp/ffmpeg/build.ia32.win/Chromium/src/libavformat/avio.c': No such file or directory
Since the path is a windows path, I am assuming we are running in the normal windows mode, not the cygwin mode. In windows mode the symbol link simply doesn't exist.
These are just my observations. I am not familiar enough with this code to understand where the real issue is. Please help.
BTW, when I disable the symbol link totally I can build successfully.