On 02/24/2014 04:42 PM, Eric Christopher wrote:> On Mon, Feb 24, 2014 at 4:40 PM, reed kotler <rkotler at mips.com> wrote: >> I need to leave soon and will take a look in the morning. >> >> I did look at the autoconf input files configure.ac >> >> There is a disable-zlib but not a disable-valgrind, even though it seems >> like there used to be. >> You can find scripts on the internet when you google of people adding >> disable-valgrind to configure. >> >> I can probably implement disable-valgrind in configure.ac. > This isn't what I was asking. You can, of course, do that, but it's > orthogonal to the issue at hand. Basically my initial thought is that > it's using the contents of the build host and not the host. > > -ericRight. There are two issues. 1 ) THere should be a way to disable valgrind as you can for zlib. 2) The configure script should be doing this properly on it's own. Most likely it's something like you are thinking; that it's making the decision based on the wrong criteria; host vs. target. #1 will allow me to work around my problem and should be there anyway. #2 should also work but is not a requirement for me at this exact moment. I will fix it if I can see exactly what the issue is. Reed>> Reed >> >> >> On 02/24/2014 04:33 PM, Eric Christopher wrote: >>> Have you looked at the compile lines during the configure? Is it using >>> the system includes/libraries when building with clang rather than the >>> target system? >>> >>> -eric >>> >>> On Mon, Feb 24, 2014 at 4:24 PM, reed kotler <rkotler at mips.com> wrote: >>>> On 02/24/2014 04:19 PM, Eric Christopher wrote: >>>> >>>> On Mon, Feb 24, 2014 at 4:14 PM, reed kotler <rkotler at mips.com> wrote: >>>> >>>> I'm trying to build a native hosted mips compiler on ubuntu x86. >>>> >>>> When I run configure with clang/llvm as the compiler, configure thinks >>>> that >>>> zlib is present and that valgrind is. >>>> >>>> But later on the make it cannot find zlib.h. If I tell it to not do >>>> compression, then it does not look for >>>> zlib.h but dies looking for valgrind, even if I tell it to >>>> disable-valgrind. >>>> >>>> If I configure using gcc-mips, it decides on it's own that zlib.h is not >>>> available. >>>> It also decides that valgrind is not available. >>>> >>>> Why the difference? >>>> >>>> How are you configuring? >>>> >>>> -eric >>>> >>>> >>>> (You can see our wiki page >>>> https://dmz-portal.mips.com/wiki/Build_mips_clang_llvm ) >>>> >>>> Basically: >>>> >>>> $ OPT="-target mipsel-linux-gnu -mips32r2 -gcc-toolchain ${MIPS}" >>>> >>>> >>>> $ $CLANG_SRC/configure \ >>>> --prefix=$CLANG_INSTALL \ >>>> --build=i686-pc-linux-gnu \ >>>> --host=mipsel-linux-gnu \ >>>> --enable-optimized \ # turn on optimization >>>> "--with-extra-options=${OPT}" \ >>>> "--with-extra-ld-options=${OPT}" \ >>>> CC=$CLANG_TC/bin/clang \ >>>> CXX=$CLANG_TC/bin/clang++ \ >>>> RANLIB=$MIPS/bin/mips-linux-gnu-ranlib \ >>>> AR=$MIPS/bin/mips-linux-gnu-ar \ >>>> build_alias=i686-unknown-linux-gnu host_alias=mipsel-linux-gnu >>>> >>>> >>>> Any ideas? >>>> >>>> Reed >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>> >>>>
On Mon, Feb 24, 2014 at 4:46 PM, reed kotler <rkotler at mips.com> wrote:> On 02/24/2014 04:42 PM, Eric Christopher wrote: >> >> On Mon, Feb 24, 2014 at 4:40 PM, reed kotler <rkotler at mips.com> wrote: >>> >>> I need to leave soon and will take a look in the morning. >>> >>> I did look at the autoconf input files configure.ac >>> >>> There is a disable-zlib but not a disable-valgrind, even though it seems >>> like there used to be. >>> You can find scripts on the internet when you google of people adding >>> disable-valgrind to configure. >>> >>> I can probably implement disable-valgrind in configure.ac. >> >> This isn't what I was asking. You can, of course, do that, but it's >> orthogonal to the issue at hand. Basically my initial thought is that >> it's using the contents of the build host and not the host. >> >> -eric > > Right. > > There are two issues. > > 1 ) THere should be a way to disable valgrind as you can for zlib.*shrug* If you like. It's not your issue.> > 2) The configure script should be doing this properly on it's own. > Most likely it's something like you are thinking; that it's making the > decision > based on the wrong criteria; host vs. target. >It absolutely should not be based on any sort of triple test whatsoever. -eric> > #2 should also work but is not a requirement for me at this exact moment. > I will fix it if I can see exactly what the issue is. > > Reed > > >>> Reed >>> >>> >>> On 02/24/2014 04:33 PM, Eric Christopher wrote: >>>> >>>> Have you looked at the compile lines during the configure? Is it using >>>> the system includes/libraries when building with clang rather than the >>>> target system? >>>> >>>> -eric >>>> >>>> On Mon, Feb 24, 2014 at 4:24 PM, reed kotler <rkotler at mips.com> wrote: >>>>> >>>>> On 02/24/2014 04:19 PM, Eric Christopher wrote: >>>>> >>>>> On Mon, Feb 24, 2014 at 4:14 PM, reed kotler <rkotler at mips.com> wrote: >>>>> >>>>> I'm trying to build a native hosted mips compiler on ubuntu x86. >>>>> >>>>> When I run configure with clang/llvm as the compiler, configure thinks >>>>> that >>>>> zlib is present and that valgrind is. >>>>> >>>>> But later on the make it cannot find zlib.h. If I tell it to not do >>>>> compression, then it does not look for >>>>> zlib.h but dies looking for valgrind, even if I tell it to >>>>> disable-valgrind. >>>>> >>>>> If I configure using gcc-mips, it decides on it's own that zlib.h is >>>>> not >>>>> available. >>>>> It also decides that valgrind is not available. >>>>> >>>>> Why the difference? >>>>> >>>>> How are you configuring? >>>>> >>>>> -eric >>>>> >>>>> >>>>> (You can see our wiki page >>>>> https://dmz-portal.mips.com/wiki/Build_mips_clang_llvm ) >>>>> >>>>> Basically: >>>>> >>>>> $ OPT="-target mipsel-linux-gnu -mips32r2 -gcc-toolchain ${MIPS}" >>>>> >>>>> >>>>> $ $CLANG_SRC/configure \ >>>>> --prefix=$CLANG_INSTALL \ >>>>> --build=i686-pc-linux-gnu \ >>>>> --host=mipsel-linux-gnu \ >>>>> --enable-optimized \ # turn on optimization >>>>> "--with-extra-options=${OPT}" \ >>>>> "--with-extra-ld-options=${OPT}" \ >>>>> CC=$CLANG_TC/bin/clang \ >>>>> CXX=$CLANG_TC/bin/clang++ \ >>>>> RANLIB=$MIPS/bin/mips-linux-gnu-ranlib \ >>>>> AR=$MIPS/bin/mips-linux-gnu-ar \ >>>>> build_alias=i686-unknown-linux-gnu host_alias=mipsel-linux-gnu >>>>> >>>>> >>>>> Any ideas? >>>>> >>>>> Reed >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> LLVM Developers mailing list >>>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>>> >>>>> >
reed kotler <rkotler at mips.com> writes:> On 02/24/2014 04:42 PM, Eric Christopher wrote: >> On Mon, Feb 24, 2014 at 4:40 PM, reed kotler <rkotler at mips.com> wrote: >>> I need to leave soon and will take a look in the morning. >>> >>> I did look at the autoconf input files configure.ac >>> >>> There is a disable-zlib but not a disable-valgrind, even though it seems >>> like there used to be. >>> You can find scripts on the internet when you google of people adding >>> disable-valgrind to configure. >>> >>> I can probably implement disable-valgrind in configure.ac. >> This isn't what I was asking. You can, of course, do that, but it's >> orthogonal to the issue at hand. Basically my initial thought is that >> it's using the contents of the build host and not the host. >> >> -eric > Right. > > There are two issues. > > 1 ) THere should be a way to disable valgrind as you can for zlib.FWIW, because of inline asm in valgrind.h that LLVM can't yet handle, I use: ac_cv_header_valgrind_valgrind_h=no .../configure ... when bootstrapping clang on z. Obviously --disable-valgrind would be cleaner but this is another way out. (Of course, I agree with what Eric says about it finding the wrong set of headers.) Thanks, Richard
On 02/25/2014 09:30 AM, Richard Sandiford wrote:> reed kotler <rkotler at mips.com> writes: >> On 02/24/2014 04:42 PM, Eric Christopher wrote: >>> On Mon, Feb 24, 2014 at 4:40 PM, reed kotler <rkotler at mips.com> wrote: >>>> I need to leave soon and will take a look in the morning. >>>> >>>> I did look at the autoconf input files configure.ac >>>> >>>> There is a disable-zlib but not a disable-valgrind, even though it seems >>>> like there used to be. >>>> You can find scripts on the internet when you google of people adding >>>> disable-valgrind to configure. >>>> >>>> I can probably implement disable-valgrind in configure.ac. >>> This isn't what I was asking. You can, of course, do that, but it's >>> orthogonal to the issue at hand. Basically my initial thought is that >>> it's using the contents of the build host and not the host. >>> >>> -eric >> Right. >> >> There are two issues. >> >> 1 ) THere should be a way to disable valgrind as you can for zlib. > FWIW, because of inline asm in valgrind.h that LLVM can't yet handle, I use: > > ac_cv_header_valgrind_valgrind_h=no .../configure ...when i do that i get: llvm[1]: Compiling regfree.c for Release+Asserts build llvm[1]: Compiling regstrlcpy.c for Release+Asserts build llvm[1]: Compiling system_error.cpp for Release+Asserts build llvm[1]: Building Release+Asserts Archive Library libLLVMSupport.a make[1]: *** [/home/rkotler/caviumllvmwclang/build/Release+Asserts/lib/libLLVMSupport.a] Error 127 make[1]: Leaving directory `/home/rkotler/caviumllvmwclang/build/lib/Support' make: *** [all] Error 1 rkotler at mipssw006:~/caviumllvmwclang/build$> when bootstrapping clang on z. Obviously --disable-valgrind would be > cleaner but this is another way out. > > (Of course, I agree with what Eric says about it finding the wrong set > of headers.) > > Thanks, > Richard >