I could not cross compile the 3.8 Valgrind code for MIPS - Linux on my Ubuntu machine. Error details - (seems - mips32 option not getting realised by environment) gcc -Wno-long-long -Wno-pointer-sign -fno-stack-protector \ -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing \ -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -mips32 \ -O -S -o auxprogs/genoffsets.s \ auxprogs/genoffsets.c cc1: error: unrecognized command line option "-mips32" About Environment -------------------------------------------------------------------------------------------- about GCC version that i tried - 4.5 (sharing below more info) vboma@dhcp-64-100-106-126:~/valgrind-src/valgrind-3.8.1$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.5.0/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 20100414-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,java,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --with-plugin-ld=ld.gold --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.5-snap --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.5.0 (Ubuntu 20100414-0ubuntu1) build configure details -------------------------------------------------------- vboma@dhcp-64-100-106-126:~/valgrind-src/valgrind-3.8.1$ ./configure --host=mipsel-linux-gnu configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for mipsel-linux-gnu-strip... no checking for strip... strip checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether to enable maintainer-specific portions of Makefiles... no checking whether ln -s works... yes checking for mipsel-linux-gnu-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for mipsel-linux-gnu-g++... no checking for mipsel-linux-gnu-c++... no checking for mipsel-linux-gnu-gpp... no checking for mipsel-linux-gnu-aCC... no checking for mipsel-linux-gnu-CC... no checking for mipsel-linux-gnu-cxx... no checking for mipsel-linux-gnu-cc++... no checking for mipsel-linux-gnu-cl.exe... no checking for mipsel-linux-gnu-FCC... no checking for mipsel-linux-gnu-KCC... no checking for mipsel-linux-gnu-RCC... no checking for mipsel-linux-gnu-xlC_r... no checking for mipsel-linux-gnu-xlC... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for mipsel-linux-gnu-ranlib... no checking for ranlib... ranlib checking for a sed that does not truncate output... /bin/sed checking for ar... /usr/bin/ar checking for perl... /usr/bin/perl checking for gdb... /usr/bin/gdb checking dependency style of gcc... gcc3 checking for diff -u... yes checking for a supported version of gcc... ok (4.5.0) checking build system type... x86_64-unknown-linux-gnu checking host system type... mipsel-unknown-linux-gnu checking for a supported CPU... ok (mipsel) checking for a 64-bit only build... no checking for a 32-bit only build... no checking for a supported OS... ok (linux-gnu) checking for the kernel version... 2.6.x/3.x family (2.6.32-48-generic) checking for a supported CPU/OS combination... ok (mips32-linux) ok (mipsel-linux-gnu) checking for use as an inner Valgrind... no checking for Pagesize... 4k checking for shared memory alignment... 2*PAGE_SIZE checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking features.h usability... yes checking features.h presence... yes checking for features.h... yes checking the GLIBC_VERSION version... 2.11 family checking for CLOCK_MONOTONIC... yes checking for pthread_rwlock_t... yes checking for PTHREAD_MUTEX_ADAPTIVE_NP... yes checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes checking for PTHREAD_MUTEX_RECURSIVE_NP... yes checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP... yes checking for pthread_mutex_t.__m_kind... no checking for pthread_mutex_t.__data.__kind... yes checking for Altivec... no checking for VSX... no checking that assembler knows DFP... no checking that compiler knows -mhard-dfp switch... no checking for pthread_create@GLIBC2.0()... no checking for eventfd()... yes checking if gcc accepts -m32... yes checking if gcc accepts -m64... yes checking if gcc accepts -mmmx... yes checking if gcc accepts -msse... yes checking if gcc accepts -mpreferred-stack-boundary... no checking if gcc accepts -Wno-pointer-sign... yes checking if gcc accepts -Wno-empty-body... yes checking if gcc accepts -Wno-format-zero-length... yes checking if gcc accepts -Wno-nonnull... yes checking if gcc accepts -Wno-overflow... yes checking if gcc accepts -Wno-uninitialized... yes checking if gcc accepts -Wextra or -W... -Wextra checking if gcc accepts -fno-stack-protector... yes checking if gcc accepts --param inline-unit-growth... yes checking if gcc accepts -gdwarf-4 -fdebug-types-section... no checking if the linker accepts -Wl,--build-id=none... yes checking if ppc32/64 as supports mtocrf/mfocrf... no checking if x86/amd64 assembler speaks SSE3... yes checking if x86/amd64 assembler speaks SSSE3... yes checking if x86/amd64 assembler supports 'pclmulqdq'... yes checking if x86/amd64 assembler supports 'vpclmulqdq'... yes checking if x86/amd64 assembler supports 'lzcnt'... yes checking if x86/amd64 assembler speaks SSE4.2... yes checking if x86/amd64 assembler speaks AVX... yes checking if x86/amd64 assembler knows the MOVBE insn... yes checking if gcc supports the ifunc attribute... no checking for TLS support... yes checking for ANSI C header files... (cached) yes checking asm/unistd.h usability... yes checking asm/unistd.h presence... yes checking for asm/unistd.h... yes checking endian.h usability... yes checking endian.h presence... yes checking for endian.h... yes checking mqueue.h usability... yes checking mqueue.h presence... yes checking for mqueue.h... yes checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no checking sys/epoll.h usability... yes checking sys/epoll.h presence... yes checking for sys/epoll.h... yes checking sys/eventfd.h usability... yes checking sys/eventfd.h presence... yes checking for sys/eventfd.h... yes checking sys/klog.h usability... yes checking sys/klog.h presence... yes checking for sys/klog.h... yes checking sys/poll.h usability... yes checking sys/poll.h presence... yes checking for sys/poll.h... yes checking sys/signal.h usability... yes checking sys/signal.h presence... yes checking for sys/signal.h... yes checking sys/signalfd.h usability... yes checking sys/signalfd.h presence... yes checking for sys/signalfd.h... yes checking sys/syscall.h usability... yes checking sys/syscall.h presence... yes checking for sys/syscall.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for sys/types.h... (cached) yes checking if <linux/futex.h> is usable... yes checking for uid_t in sys/types.h... yes checking for off_t... yes checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking for working memcmp... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for getpagesize... yes checking for working mmap... yes checking for pthread_create in -lpthread... yes checking for clock_gettime in -lrt... yes checking for clock_gettime... yes checking for epoll_create... yes checking for epoll_pwait... yes checking for klogctl... yes checking for mallinfo... yes checking for memchr... yes checking for memset... yes checking for mkdir... yes checking for mremap... yes checking for ppoll... yes checking for pthread_barrier_init... yes checking for pthread_condattr_setclock... yes checking for pthread_mutex_timedlock... yes checking for pthread_rwlock_timedrdlock... yes checking for pthread_rwlock_timedwrlock... yes checking for pthread_spin_lock... yes checking for pthread_yield... yes checking for readlinkat... yes checking for semtimedop... yes checking for signalfd... yes checking for sigwaitinfo... yes checking for strchr... yes checking for strdup... yes checking for strpbrk... yes checking for strrchr... yes checking for strstr... yes checking for syscall... yes checking for utimensat... yes checking for process_vm_readv... no checking for process_vm_writev... no checking primary target for usable MPI2-compliant C compiler and mpi.h... no checking secondary target for usable MPI2-compliant C compiler and mpi.h... no checking for boost... no checking for OpenMP... yes checking if gcc supports __sync_add_and_fetch for the primary target... yes checking if gcc supports __sync_add_and_fetch on uint64_t for all targets... yes checking if g++ supports __sync_add_and_fetch... yes checking if libstdc++ supports annotating shared pointers... no configure: creating ./config.status config.status: creating Makefile config.status: creating VEX/Makefile config.status: creating valgrind.spec config.status: creating valgrind.pc config.status: creating glibc-2.X.supp config.status: creating docs/Makefile config.status: creating tests/Makefile config.status: creating tests/vg_regtest config.status: creating perf/Makefile config.status: creating perf/vg_perf config.status: creating gdbserver_tests/Makefile config.status: creating include/Makefile config.status: creating auxprogs/Makefile config.status: creating mpi/Makefile config.status: creating coregrind/Makefile config.status: creating memcheck/Makefile config.status: creating memcheck/tests/Makefile config.status: creating memcheck/tests/amd64/Makefile config.status: creating memcheck/tests/x86/Makefile config.status: creating memcheck/tests/linux/Makefile config.status: creating memcheck/tests/darwin/Makefile config.status: creating memcheck/tests/amd64-linux/Makefile config.status: creating memcheck/tests/x86-linux/Makefile config.status: creating memcheck/tests/ppc32/Makefile config.status: creating memcheck/tests/ppc64/Makefile config.status: creating memcheck/tests/s390x/Makefile config.status: creating cachegrind/Makefile config.status: creating cachegrind/tests/Makefile config.status: creating cachegrind/tests/x86/Makefile config.status: creating cachegrind/cg_annotate config.status: creating cachegrind/cg_diff config.status: creating callgrind/Makefile config.status: creating callgrind/callgrind_annotate config.status: creating callgrind/callgrind_control config.status: creating callgrind/tests/Makefile config.status: creating helgrind/Makefile config.status: creating helgrind/tests/Makefile config.status: creating massif/Makefile config.status: creating massif/tests/Makefile config.status: creating massif/ms_print config.status: creating lackey/Makefile config.status: creating lackey/tests/Makefile config.status: creating none/Makefile config.status: creating none/tests/Makefile config.status: creating none/tests/amd64/Makefile config.status: creating none/tests/ppc32/Makefile config.status: creating none/tests/ppc64/Makefile config.status: creating none/tests/x86/Makefile config.status: creating none/tests/arm/Makefile config.status: creating none/tests/s390x/Makefile config.status: creating none/tests/mips32/Makefile config.status: creating none/tests/linux/Makefile config.status: creating none/tests/darwin/Makefile config.status: creating none/tests/x86-linux/Makefile config.status: creating exp-sgcheck/Makefile config.status: creating exp-sgcheck/tests/Makefile config.status: creating drd/Makefile config.status: creating drd/scripts/download-and-build-splash2 config.status: creating drd/tests/Makefile config.status: creating exp-bbv/Makefile config.status: creating exp-bbv/tests/Makefile config.status: creating exp-bbv/tests/x86/Makefile config.status: creating exp-bbv/tests/x86-linux/Makefile config.status: creating exp-bbv/tests/amd64-linux/Makefile config.status: creating exp-bbv/tests/ppc32-linux/Makefile config.status: creating exp-bbv/tests/arm-linux/Makefile config.status: creating exp-dhat/Makefile config.status: creating exp-dhat/tests/Makefile config.status: creating coregrind/link_tool_exe_linux config.status: creating coregrind/link_tool_exe_darwin config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands
Hi , i came out from the error reported and relaised the acual environment issue from my end . As of now the below is the compile issue with my tool chain - not sure its srequires any more support from too chain or we can disable the relevent code path .. pls suggest needful . Compilation error details - fatal error: linux/a.out.h: No such file or directory from the file m_debuginfo/readstabs.c .. More -- make[3]: Entering directory `/home/vboma/valgrind-src/valgrind-3.8.1/coregrind' mips-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_mips32=1 -DVGO_linux=1 -DVGP_mips32_linux=1 -DVGPV_mips32_linux_vanilla=1 -I../coregrind -DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -DVG_PLATFORM="\"mips32-linux\"" -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -mips32 -DENABLE_LINUX_TICKET_LOCK -Wno-long-long -Wno-pointer-sign -fno-stack-protector -MT libcoregrind_mips32_linux_a-readstabs.o -MD -MP -MF .deps/libcoregrind_mips32_linux_a-readstabs.Tpo -c -o libcoregrind_mips32_linux_a-readstabs.o `test -f 'm_debuginfo/readstabs.c' || echo './'`m_debuginfo/readstabs.c In file included from m_debuginfo/readstabs.c:56:0: /opt/bcm/stbgcc-4.5.3-2.4-20130325/bin/../mips-linux-uclibc/sys-root/usr/include/a.out.h:1:25: fatal error: linux/a.out.h: No such file or directory environment -- cross compiling for -- mips-linux . ENV -- /opt/bcm/stbgcc-4.5.3-2.4-20130325/bin:/opt/bcm/stbgcc-4.5.3-2.4-20130325:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
Hello, > /opt/bcm/stbgcc-4.5.3-2.4-20130325/bin/../mips-linux-uclibc/sys-root/usr/include/a.out.h:1:25: fatal error: linux/a.out.h: No such file or directory Can you try to apply this patch and compile your Valgrind again: http://patchwork.ozlabs.org/patch/157058/
Thanks Alot . It compiled fine and will check with my environment matching details and its execution behavior . On Wed, Jul 3, 2013 at 8:44 AM, Dejan Jevtic <dejan.jevtic@rt-rk.com> wrote: > https://bugs.kde.org/show_bug.cgi?id=321836 > > --- Comment #2 from Dejan Jevtic <dejan.jevtic@rt-rk.com> --- > Hello, > > > > /opt/bcm/stbgcc-4.5.3-2.4-20130325/bin/../mips-linux-uclibc/sys-root/usr/include/a.out.h:1:25: > fatal error: linux/a.out.h: No such file or directory > > Can you try to apply this patch and compile your Valgrind again: > > http://patchwork.ozlabs.org/patch/157058/ > > -- > You are receiving this mail because: > You are on the CC list for the bug. > You reported the bug. >
Workaround is available. I do not think it should be upstreamed. If no one else thinks different, then we can close this issue.
It would be nice if the compilation error "m_debuginfo/readstabs.c:57:39: fatal error: a.out.h: No such file or directory" could be fixed in the SVN head. I ran into the problem when trying to build Valgrind on Ubuntu 13.04. Other people have also encountered it (see e.g. the thread "compilation error" on valgrind-users [1]). [1] http://sourceforge.net/mailarchive/message.php?msg_id=31165194
I believe this issue has been fixed in r14484. Please reopen the issue if there are more issues with the current trunk.