Closed class101 closed 10 years ago
So you already have folders existing and that confuses the build system? I am not surprised.
For you own sanity, never build software into existing folders.
If it is existing I did not create it but the script huhu.. + I'm deleting manually all build folder before each builds so it is evident this folder has been created by the ct-ng fork or a patch and then this procedure fails.
If I do not do this
- CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/include"
+ CT_DoExecLog ALL cp -a "${CT_HEADERS_DIR}" "${prefix}/${CT_TARGET}/"
I will end with an include error because you made ${prefix}/${CT_TARGET}/include/include
I build linux targeting compilers frequently and they are usually fine. can you share a build.log of a failure?
Indeed I double checked the log but the folder doesn't seem to be created by ct-ng but instead I suspect it being created by binutils and its prefix=${CT_BUILDTOOLS_PREFIX_DIR} because next to the include folder is /bin/ with exactly, ar, as, ld, ld.bfd and strip (to note the folder is created but empty so it is just placeholder and safe to delete)
do_binutils_for_build() {
local -a binutils_opts
case "${CT_TOOLCHAIN_TYPE}" in
native|cross) return 0;;
esac
CT_DoStep INFO "Installing binutils for build"
CT_mkdir_pushd "${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}"
binutils_opts+=( "host=${CT_BUILD}" )
binutils_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
build.log:https://drive.google.com/file/d/0B4dcRcayW88VczNVNGxGMi1sOWM/edit?usp=sharing
Thanks,
From your log:
[DEBUG] Already extracted 'mpfr-3.1.2' [DEBUG] Already patched 'mpfr-3.1.2' .. etc
.. so clearly you are not cleaning everything out. Please do that and give me the build.log again.
wait, this is first use problem, I should also clean the source folder before each builds ? because I never did :X I thought because we could set a custom source folder this allow us to keep the src extracted for next builds maybe I'm wrong but now you say it, I always build linux after windows so technically sources have already been used to build for windows targets when I'm building Linux, could explain why I have problems you don't have, thanks for noticing this
You absolutely must delete the .build folders and the src folder is a subfolder of that. These 100% must also be deleted for correct results. The linux-kernel headers and glibc do parts of their build in the source tree. Do not try to save yourself 5 minutes because it ends up wasting time in the long run (such as this bug report)
Totally true , I feel so dumb now for just winning few seconds, thanks a lot for this
ct-ng has facility for custom source folders ($HOME/src usually) but it only uses these to find cached tarballs and you should always make sure it re-extracts into clean folders on each and every build.
Something I already reported but you did not fixed, so test these sample cases on Windows and you will get it
Working fine
Pathing bug
Notice the double include path /x/cptest/dest/include/include/testfile
This is root cause of problems in 100-gcc.sh targeting Linux because your patch below is never installed correctly if "${prefix}/${CT_TARGET}/include" exists
or in a old build.sh patch