Menu

#81 Make permission problem ?

2.0
closed
Alexx83
None
2014-10-02
2014-09-23
No

Having some weird problems with make.

error 126 permission denied i think ?.
and Bad Address instead of telling me whats wrong.

Had to resort to using the older make 3.81 which mostly works,
it does however also fail some times.

antivirus is F-Secure but disabling it does not work make still fails.

project im building was a gcc bootstrap using the mingw builds scripts.

Discussion

1 2 > >> (Page 1 of 2)
  • Ray Donnelly

    Ray Donnelly - 2014-09-23

    Please investigate using strace. If you don't get anywhere please post strace output from each version of make.

     

    Last edit: Ray Donnelly 2014-09-23
  • ralph engels

    ralph engels - 2014-09-23

    running strace on make left me with a 1 gb logfile Oo im afraid i cannot open it as its to big.

     
  • ralph engels

    ralph engels - 2014-09-23

    ok changing the mask to minimal worked, heres the output ->

    libbackend.a(function.o):function.c:(.text+0xe9d): undefined reference to gen_simple_return()' libbackend.a(function.o):function.c:(.text+0xed1): undefined reference togen_return()'
    libbackend.a(function.o):function.c:(.text+0x79b8): undefined reference to gen_prologue()' libbackend.a(function.o):function.c:(.text+0x819e): undefined reference togen_epilogue()'
    libbackend.a(function.o):function.c:(.text+0x8416): undefined reference to gen_sibcall_epilogue()' libbackend.a(function.o):function.c:(.text+0x85ed): undefined reference togen_blockage()'
    libbackend.a(function.o):function.c:(.text+0x86c8): undefined reference to gen_simple_return()' libbackend.a(function.o):function.c:(.text+0x8743): undefined reference togen_split_stack_prologue()'
    libbackend.a(function.o):function.c:(.text+0xb4ca): undefined reference to gen_stack_protect_test(rtx_def*, rtx_def*, rtx_def*)' libbackend.a(function.o):function.c:(.text+0xb803): undefined reference togen_blockage()'
    libbackend.a(function.o):function.c:(.text+0xb901): undefined reference to gen_blockage()' h:/msys2/home/ralph/mingw-w64-builds/toolchains/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: libbackend.a(function.o): bad reloc address 0x0 in section.pdata'
    collect2.exe: error: ld returned 1 exit status
    make[2]: [cc1.exe] Error 1
    make[2]: Leaving directory /home/Ralph/x86_64-491-posix-seh-rt_v4/build/gcc-4.9.1/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory/home/Ralph/x86_64-491-posix-seh-rt_v4/build/gcc-4.9.1'
    make:
    [all] Error 2

    strange that i have to use strace to see this kinda output though ?.

    hmm cant seem to look up anything usefull via google on these functions either.

     
  • Alexx83

    Alexx83 - 2014-09-23

    I don't understand where you see here permission problems?

     
    • ralph engels

      ralph engels - 2014-09-23

      Its very strange i agree but without strace all it prints is

      make[2]: Entering directory
      /home/Ralph/i686-491-posix-sjlj-rt_v4/build/gcc-4.9.1/libdecnumber' source='../../../../src/gcc-4.9.1/libdecnumber/decNumber.c' object='decNumber.o' libtool=no i686-w64-mingw32-gcc -I../../../../src/gcc-4.9.1/libdecnumber -I. -Wno-error -O2 -pipe -Wno-error -I/home/Ralph/i686-491-posix-sjlj-rt_v4/mingw32/opt/include -I/home/Ralph/prerequisites/i686-zlib-shared/include -I/home/Ralph/prerequisites/i686-w64-mingw32-shared/include -D__USE_MINGW_ACCESS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -pedantic -Wno-long-long -I../../../../src/gcc-4.9.1/libdecnumber -I. -c ../../../../src/gcc-4.9.1/libdecnumber/decNumber.c /bin/sh: /home/Ralph/mingw-w64-builds/toolchains/mingw32/bin/i686-w64-mingw32-gcc: Bad address make[2]: *** [decNumber.o] Error 126 make[2]: Leaving directory/home/Ralph/i686-491-posix-sjlj-rt_v4/build/gcc-4.9.1/libdecnumber'
      make[1]: [all-libdecnumber] Error 2
      make[1]: Leaving directory
      `/home/Ralph/i686-491-posix-sjlj-rt_v4/build/gcc-4.9.1'
      make:
      [all] Error 2

      it seems to get a bit further with strace on but still fails.
      Not sure where to go from here as the strace output has nothing to do
      with the above.

       

      Last edit: ralph engels 2014-09-24
      • ralph engels

        ralph engels - 2014-09-24

        Hmm ok now i think i got the right message.

        /mingw64/x86_64-w64-mingw32/bin/ar rc libgcc.a $objects
        --- Process 9056, exception c0000005 at 0000000180172653
        /bin/sh: linje 7: /mingw64/x86_64-w64-mingw32/bin/ar: Bad address

        looks like an access violation hmm ? bug in gcc-4.9.1 source maybe.

        edit: removed previous posts spam.

         

        Last edit: ralph engels 2014-09-24
  • Alexx83

    Alexx83 - 2014-09-24

    Do you use Win8 or maybe FAT32 drives?

     
  • ralph engels

    ralph engels - 2014-09-24

    Win 7 64 NTFS.

    A little more poking araund with strace i noticed that strace itself crashed with a waiting for child timeout, so thats why the output was different from the first time.

    i tried uninstalling F-Secure to see if that would do any difference but no.

    also tried rebasing Msys2 again and restarting the PC but it still fails in exactly the same place if i dont use strace.

    Using the old Msys shell it works though i cannot use the mingw-builds scripts with it
    so i had to resort to writing something temporary myself.

    strangely enough Msys2 only fails on bootstrapping gcc everything else builds fine.
    The crash allways happens in the libdecnumber code.

    Last effort would be reinstalling Win 7 but id rather avoid that if possible.

     
  • ralph engels

    ralph engels - 2014-09-24

    Ok im officially stumped, as a last ditch effort i tried running make with -i to see how far it would go, guess what it builds the decnumber library despite make reporting error 126 on them ... what on earth can cause this ? it looks like something is denying make access to some files but i cant for the life of me find out what. windows 7 logs dont point out anything blocking make and i build with -j1 to rule out thread races but i noticed that make still starts 8 threads despite that.

     
  • Alexx83

    Alexx83 - 2014-09-24

    Do you have latest packages for MSYS2?
    If so then maybe this is issue with our new path converting procedure somehow (https://github.com/Alexpux/MSYS2-packages/blob/master/msys2-runtime/0003-Add-msys2_path_conv.patch).
    Will be great to see what problem is. Todat I will try rebuild mingw-w64 GCC packages and see if something like this happen to me.

     
  • ralph engels

    ralph engels - 2014-09-24

    Aye all Msys2 packages updated.

    For your sake i hope thats not the problem but for mine,
    well it would be nice to know what causes this.

    For now ill have to resort to using the old Msys for building,
    but i hope this one gets fixed.

     
  • ralph engels

    ralph engels - 2014-09-25

    To rule out any fault on my part i checked earlier gcc releases using the official mingw-builds scripts and they all fail in exactly the same place.

    Hope this helps in hunting down whats causing this.

     
  • ralph engels

    ralph engels - 2014-10-01

    I reverted the Msys2 runtime to the last one before the patch you mentioned and Msys2 works again for bootstrapping gcc, so it seems that patch needs some work before being committed.

     
  • Alexx83

    Alexx83 - 2014-10-01

    Thanks Ralph for testing!
    I will try to find what is wrongly converted.

     
  • ralph engels

    ralph engels - 2014-10-01

    Thanks Alex.

    And No problem, we all get to enjoy this being fixed.
    Might not be it but i remember newer gcc source releases had some path conversion
    built in which may interfere with your patch, but its worth looking at.

     
  • Alexx83

    Alexx83 - 2014-10-01

    I'm upload new msys2-runtime. Please test it if you can.

    Regards,
    Alexey.

     
  • ralph engels

    ralph engels - 2014-10-01

    Testing now, ran into another problem though

    error: msys: signature from "Alexey Pavlov (Alexpux) alexpux@gmail.com" is unknown trust
    :: Synkroniserer pakkedatabaser...
    mingw32 is updated
    mingw64 is updated
    msys is updated
    error: database 'msys' is invalid (invalid or broken database (PGP-signatur))

    so i had to resort to downloading and installing it manually.
    Any way i can fix this ?.

     
  • ralph engels

    ralph engels - 2014-10-01

    Ah fixed it myself, but if other users run into this heres a howto.

    run pacman-key --init followed by pacman-key --populate and all should work again.

    edit forgot that you need to run pacman-db-upgrade before the other two above.

     

    Last edit: ralph engels 2014-10-01
  • ralph engels

    ralph engels - 2014-10-01

    Ok build is past libdecnumber so far it looks promissing.
    Ill let it finish the bootstrap and if all works as expected (or not) ill report back.

     
  • ralph engels

    ralph engels - 2014-10-01

    Im afraid its still not there.

    /bin/sh: /home/Ralph/mingw-w64-builds/toolchains/mingw64/bin/x86_64-w64-mingw32-gcc: Bad address
    make[3]: [decNumber.o] Error 126
    make[3]: Leaving directory /home/Ralph/x86_64-491-posix-seh-rt_v4/build/gcc-4.9.1/libdecnumber' make[2]: *** [all-stage1-libdecnumber] Error 2 make[2]: Leaving directory/home/Ralph/x86_64-491-posix-seh-rt_v4/build/gcc-4.9.1'
    make[1]:
    [stage1-bubble] Error 2
    make[1]: Leaving directory `/home/Ralph/x86_64-491-posix-seh-rt_v4/build/gcc-4.9.1'
    make: *** [all] Error 2

    same place even :S.

     

    Last edit: ralph engels 2014-10-01
  • ralph engels

    ralph engels - 2014-10-01

    Ok this is weird, now my old shell scripts from msys1 work in msys2 with the new runtime
    you uploaded. They did not even work with it before with the old runtime i had to use to bootstrap gcc.

    Not sure if that was the intent ?
    but the new runtime still breaks the mingw-builds scripts but work with
    my own handmade shell scripts for msys1 which are all kinda wrong because i had to work around some cranky msys1 path conversions.

    Heres my old script for building an i686-w64-mingw32 compiler

    ABSPATH=$(cd "$(dirname "$0")"; pwd)
    REALPATH=/mingw32
    INSTDIR=${ABSPATH}/_inst32
    BUILDDIR=${ABSPATH}/_gccbuild32
    rm -fr ${BUILDDIR} && \ mkdir ${BUILDDIR} && \ cd ${BUILDDIR} && \ export CPATH="${REALPATH}/i686-w64-mingw32/include:${REALPATH}/include" && \ export LPATH="${REALPATH}/i686-w64-mingw32/lib:${REALPATH}/lib" && \ export CFLAGS+="-O2 -pipe -DUSE_MINGW_ACCESS -DWINPTHREAD_STATIC -D_USE_32BIT_TIME_T" && \ export CXXFLAGS+="-O2 -pipe -DUSE_MINGW_ACCESS -DWINPTHREAD_STATIC -D_USE_32BIT_TIME_T" && \ export LIBRARY_PATH="${REALPATH}/lib/gcc/i686-w64-mingw32/4.9.1" && \ export LDFLAGS="-pipe -Wl,--large-address-aware" && \ ../gcc-4.9.1/configure \ --build=i686-w64-mingw32 \ --enable-checking=release \ --enable-threads=posix \ --enable-interwork \ --enable-languages=c,ada,c++,lto,objc,fortran,obj-c++ \ --enable-graphite \ --enable-cloog-backend=isl \ --enable-targets=i686-w64-mingw32 \ --enable-lto \ --enable-libitm \ --enable-libatomic \ --enable-libgomp \ --enable-version-specific-runtime-libs \ --enable-libstdcxx-threads \ --enable-libstdcxx-time \ --enable-fully-dynamic-string \ --enable-interpreter \ --enable-hash-synchronization \ --disable-isl-version-check \ --disable-libstdcxx-pch \ --disable-libstdcxx-debug \ --disable-multilib \ --disable-rpath \ --disable-debug \ --disable-symvers \ --disable-werror \ --disable-werror-allways \ --disable-win32-registry \ --disable-canonical-system-headers \ --prefix=${INSTDIR} \ --with-arch=i686 \ --with-gxx-include-dir=${REALPATH}/lib/gcc/i686-w64-mingw32/4.9.1/include/c++ \ --with-native-system-header-dir=${REALPATH}/i686-w64-mingw32/include \ --with-local-prefix=${REALPATH}/local \ --with-libiconv-prefix=${REALPATH} \ --without-dwarf2 \ --without-newlib \ --with-tune=generic \ --with-gmp=${INSTDIR} \ --with-mpc=${INSTDIR} \ --with-mpfr=${INSTDIR} \ --with-isl=${INSTDIR} \ --with-cloog=${INSTDIR} \ --with-gnu-as \ --with-gnu-ld \ --verbose &&
    make LDFLAGS+="-Wno-error" &&
    make DESTDIR=${INSTDIR} &&
    make DESTDIR=${INSTDIR} install-html && \ cd ..

    as you can see its all kinds of nasty.

     
  • Alexx83

    Alexx83 - 2014-10-01

    Ralph, I'm upload next msys2-runtime with fixes. Please try it.

     
  • ralph engels

    ralph engels - 2014-10-01

    Ok bootstrap at stage 2 now so far it seems to work, ill let it run to finish
    to see if anything odd comes up.

     
  • ralph engels

    ralph engels - 2014-10-01

    New runtime works as expected now,
    Thanks for looking into this.

     
  • Alexx83

    Alexx83 - 2014-10-02
    • status: open --> closed
    • assigned_to: Alexx83
     
1 2 > >> (Page 1 of 2)