1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Fwd: Re: Fwd: cross-compiling (kind of) with Buildroot |
From: | Pierrick M Hanlet via Tech-talk <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Mon, 12 Aug 2019 15:08:10 +0000 |
Hi all, I've managed to get all of my support modules built apart from StreamDevice. I can build it if I manually change the link statement to pick up the target
pcre library (the one in red), but I'd really like to fix it properly. This problem stems from the fact that Buildroot segregates its build tools and its target binaries/libraries in separate directories: - /X/output/host/usr/686-buildroot-linux-uclibc/lib and - /X/output/staging/usr/lib where /X/ represents the full path. /usr/local/products/elsd/conc405x/linux-3.16.7_generic/output/host/usr/bin/i686-buildroot-linux-uclibc-g++ -o streamApp -L/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/StreamDevice-2-8/lib/linux-686 -L/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/asyn4-35/lib/linux-686 -L/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/calc-R3-7-1/lib/linux-686 -L/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/sscan-2-11-2/lib/linux-686 -L/scratch/home/hanlet/platforms/conc405x/epicsDEV/base-3.14.12.8/lib/linux-686 -Wl,-rpath,/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/StreamDevice-2-8/lib/linux-686 -Wl,-rpath,/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/asyn4-35/lib/linux-686 -Wl,-rpath,/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/calc-R3-7-1/lib/linux-686 -Wl,-rpath,/scratch/home/hanlet/platforms/conc405x/epicsDEV/Support/sscan-2-11-2/lib/linux-686 -Wl,-rpath,/scratch/home/hanlet/platforms/conc405x/epicsDEV/base-3.14.12.8/lib/linux-686 -m32 -L/usr/local/products/elsd/conc405x/linux-3.16.7_generic/output/host/usr/i686-buildroot-linux-uclibc/lib streamApp_registerRecordDeviceDriver.o streamAppMain.o -lstream -lasyn -lcalc -lsscan -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -lpcre -lpcre /scratch/products/elsd/conc405x/linux-3.16.7_generic/output/host/usr/bin/../lib/gcc/i686-buildroot-linux-uclibc/4.8.3/../../../../i686-buildroot-linux-uclibc/bin/ld: cannot find -lpcre /scratch/products/elsd/conc405x/linux-3.16.7_generic/output/host/usr/bin/../lib/gcc/i686-buildroot-linux-uclibc/4.8.3/../../../../i686-buildroot-linux-uclibc/bin/ld: cannot find -lpcre collect2: error: ld returned 1 exit status I've attempted to fix it by creating a RELEASE.Common.linux-686 file with: PCRE_TARGET_LIB=/usr/local/products/elsd/conc405x/linux-3.16.7_generic/output/staging/usr/lib PCRE_TARGET_INCLUDE=/usr/local/products/elsd/conc405x/linux-3.16.7_generic/output/staging/usr/include but that didn't help. I've also tried modifying to the streamApp/Makefile: ifdef PCRE PROD_LIBS += pcre else ifneq ($(words $(PCRE_LIB) $(PCRE_INCLUDE)),0) PROD_SYS_LIBS_DEFAULT += pcre PROD_SYS_LIBS_WIN32 += $(PCRE_LIB)\\pcre SHRLIB_DEPLIB_DIRS += $(PCRE_LIB) endif ifneq ($(words $(PCRE_TARGET_LIB) $(PCRE_TARGET_INCLUDE)),0) PROD_SYS_LIBS_DEFAULT += pcre SHRLIB_DEPLIB_DIRS += $(PCRE_TARGET_LIB) SHRLIB_DEPLIB_DIRS += $(OP_SYS_LDLIBS) endif endif where the red text is my change. Clearly, I don't understand what I'm doing. Somehow StreamDevice build is different from other modules. Thanks, Pierrick On 7/8/19 12:12 PM, Johnson, Andrew N. wrote:
On 7/8/19 11:39 AM, Pierrick M Hanlet wrote: -- Pierrick Hanlet Fermi National Accelerator Accelerator Front End Controls +1-630-840-5555 -- lab +1-312-687-4980 -- mobile "Whether you think you can or think you can't, you're right" -- Henry Ford |