Hi all, I am having some issues with the valgrind 3.15.0 build and install in a cross-compile environment where the resultant code is to run on a router which is embedded Linux.
In this environment, the build tools are cross compiled… meaning that the target CPU is an arm v7 processor, which differs from the Linux PC processor that is compiling the code. The buildtools are arm-openwrt-linux. When I try to build the code, the configure script errors out with the message “checking for a supported CPU… no (arm)” followed by “confiure: error: Unsupported host architecture. Sorry”. Looking and configure, there is a case statement based on “$host-cpu” and it is specifically looking for armv7*, not arm. If I edit the configure script and change the armv7 to arm it will build OK, so I can in fact work around this… but I will need to patch this to apply my workaround. The build tools we use have been used for armv7 processors for some time now, and we cannot change the name to accommodate valgrind. The second issue I am having I do not have a workaround, so I am hoping someone can help. When I run configure, normally we would provide a –prefix parameter that would tell where to put the output for the install. Being an imbedded product, we do not put the output in a directory that contains the native Linux PC build tools which are PC 386 processor based. Instead, the installation directory is a temporary directory to contain all of the output from the build… then when building the image, they are relocated to the final install location. For valgrind for example, valgrind executable would be stored at …/output/debug/valgrind/install/bin directory and its library would be stored at …/output/debug/valgrind/install/lib directory. Now in the README file, I see at the bottom of it… “Important! Do not move the valgrind installation into a place different from that specified by –prefix at build time. This will cause things to break in subtle ways, mostly when valgrind handles fork/exec files.” So, in the routers image, if I specify the prefix needed to build the image so that the build system can correctly collect the binaries, I specify –prefix as …/output/debug/valgrind/install, but it appears that valgrind binary will use this as the pathname to find its library and of course, there is no …/output/debug/valgrind/install/lib directory on the router… the target directory needs to be /lib on the router. If I run strings against the valgrind binary, I see the full pathname to valgrinds library …/output/debug/valgrind/install/lib/valgrind which of course is not right, it needs to be /lib/valgrind. I have noticed if I do ./configure –help, it spits out help for other commands to be used as refinement for install directories instead of –prefix. However, if I specify –libdir=$(PACKAGE_INSTALL)/lib, where PACKAGE_INSTALL is my …/output/debug/valgrind/install directory, I get the same results as I would get had I set –prefix=$(PACKAGE_INSTALL). The strings valgrind tells the story. So, it looks to me that the install mechanism is very inflexible when it comes to cross-compile environment. If I do not specify –prefix, make install will fail with the error: /bin/mkdir -p ‘/usr/local/lib/valgrind’ /bin/mkdir: cannot create directory ‘/usr/local/lib/valgrind’: Permission denied. The build environment will not work properly if the files are stored outside of the build workspace. This would also pollute my cross-compile build tools. As it is now, I cannot integrate valgrind into the embedded Linux image. Not sure how to overcome this issue. Does anyone have a suggestion for working around this issue? Thanks for any and all help. Regards, John __________________________________________________________________ Confidential This e-mail and any files transmitted with it are the property of Belkin International, Inc. and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Pour la version française: http://www.belkin.com/email-notice/French.html Für die deutsche Übersetzung: http://www.belkin.com/email-notice/German.html __________________________________________________________________
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users