cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nishanthkunder
Visitor
Visitor
627 Views
Registered: ‎02-07-2020

Building valgrind-3.15.0

Hi,

After downloading and untarring valgrind-3.15.0, I executed the following commands  inside valgrind-3.15.0 folder:

 

./configure --host=aarch64-xilinx-linux  --target=aarch64-xilinx-linux --prefix=<local path>

make clean

make

 

I get the following error. Please suggest what I should do in such a case.

.Tpo -c -o libnolto_coregrind_arm64_linux_a-m_main.o `test -f 'm_main.c' || echo './'`m_main.c
/tmp/ccq5qaEK.s: Assembler messages:
/tmp/ccq5qaEK.s:8: Error: unrecognized symbol type ""
/tmp/ccq5qaEK.s:11: Error: no such instruction: `adrp x0,vgPlain_interim_stack'
/tmp/ccq5qaEK.s:12: Error: too many memory references for `add'
/tmp/ccq5qaEK.s:13: Error: too many memory references for `mov'
/tmp/ccq5qaEK.s:14: Error: no such instruction: `movk x1,((65536)>>16)&0xFFFF,lsl 16'
/tmp/ccq5qaEK.s:15: Error: too many memory references for `add'
/tmp/ccq5qaEK.s:16: Error: too many memory references for `mov'
/tmp/ccq5qaEK.s:17: Error: no such instruction: `movk x1,((1048576)>>16)&0xFFFF,lsl 16'
/tmp/ccq5qaEK.s:18: Error: too many memory references for `add'
/tmp/ccq5qaEK.s:19: Error: too many memory references for `and'
/tmp/ccq5qaEK.s:20: Error: too many memory references for `mov'
/tmp/ccq5qaEK.s:21: Error: too many memory references for `mov'
/tmp/ccq5qaEK.s:22: Error: too many memory references for `mov'
/tmp/ccq5qaEK.s:23: Error: no such instruction: `b _start_in_C_linux'
Makefile:8044: recipe for target 'libnolto_coregrind_arm64_linux_a-m_main.o' failed
make[3]: *** [libnolto_coregrind_arm64_linux_a-m_main.o] Error 1

 

 

 

 

0 Kudos
3 Replies
dvorkin2000
Visitor
Visitor
594 Views
Registered: ‎12-17-2019

I've used this makefile:

#
# make TARGET=gnueabi|gnueabihf|aarch64 -C valgrind-3.15.0
#
# Example:
# make TARGET=gnueabihf -C valgrind-3.15.0 

INSTALL_DIR=$(TARGET)
PREFIX=`pwd`/build-`echo $(INSTALL_DIR)`
HOST=`echo $(CROSS_COMPILE) | rev | cut -c 2- | rev`

all:clean do_patch do_configure do_make do_install do_archivate do_create_install_script

#
# clean
#
clean:
	rm -Rf $(PREFIX)/* 

#
# configure patch
#
do_patch:
	sed -i -e "s#armv7#arm#g" configure

#
# do configure valgrind
#
do_configure:
	./configure  --host=$(HOST)  \
                     --prefix=$(PREFIX) \
                     --build="x86_64-pc-linux-gnu" 

#
# make valgrind
#
do_make:
	$(MAKE)	

#
# setup valgrind into folder $(PREFIX)
#
do_install:
	$(MAKE)	install

#
# archivate
#
do_archivate:
	[ -d ../lib_xilinx/$(TARGET) ] && cp ../lib_xilinx/$(TARGET)/* $(PREFIX)/lib \
                                       || echo "Xilinx Libraries not found"
	cd $(PREFIX) && tar -czf valgrind-$(TARGET).tar.gz --exclude *.tar.gz *

#
# create script for setup valgrind at target platform
#
do_create_install_script:
	@echo "\
#!/bin/sh                                              \n\
                                                       \n\
#                                                      \n\
# The script setup env vars and          \n\
# unpack valgrind                               \n\
#                                                      \n\
# Start the script:                                              \n\
# . ./valgrind_install.sh                              \n\
#                                                      \n\
export VALGRIND_LIB=/lib/valgrind                      \n\
                                                       \n\
echo Unpack valgrind                        \n\
tar -C / -xzf /flash/valgrind-"$(TARGET)".tar.gz         \n\
" > $(PREFIX)/valgrind_install.sh
	chmod a+x $(PREFIX)/valgrind_install.sh

And then

export CROSS_COMPILE=aarch64-linux-gnu-

make TARGET=aarch64 -f ../Makefile -C valgrind-3.15.0

0 Kudos
nishanthkunder
Visitor
Visitor
518 Views
Registered: ‎02-07-2020

Hi  dvorkin2000,

Thanks for your response.

But, your suggestion did not work.

I get a similar error as before.

 

gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_arm64=1 -DVGO_linux=1 -DVGP_arm64_linux=1 -DVGPV_arm64_linux_vanilla=1  -I../coregrind -DVG_LIBDIR="\"/home/ubuntu/valgrind_2018/Gen6/valgrind-3.15/valgrind-3.15.0/build-aarch64/lib/valgrind"\" -DVG_PLATFORM="\"arm64-linux\""  -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-signedness -Wformat-security -Wignored-qualifiers -Wmissing-parameter-type -Wlogical-op -Wimplicit-fallthrough=2 -Wold-style-declaration -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin   -MT libnolto_coregrind_arm64_linux_a-m_main.o -MD -MP -MF .deps/libnolto_coregrind_arm64_linux_a-m_main.Tpo -c -o libnolto_coregrind_arm64_linux_a-m_main.o `test -f 'm_main.c' || echo './'`m_main.c
/tmp/cc165hIG.s: Assembler messages:
/tmp/cc165hIG.s:8: Error: unrecognized symbol type ""
/tmp/cc165hIG.s:11: Error: no such instruction: `adrp x0,vgPlain_interim_stack'
/tmp/cc165hIG.s:12: Error: too many memory references for `add'
/tmp/cc165hIG.s:13: Error: too many memory references for `mov'
/tmp/cc165hIG.s:14: Error: no such instruction: `movk x1,((65536)>>16)&0xFFFF,lsl 16'
/tmp/cc165hIG.s:15: Error: too many memory references for `add'
/tmp/cc165hIG.s:16: Error: too many memory references for `mov'
/tmp/cc165hIG.s:17: Error: no such instruction: `movk x1,((1048576)>>16)&0xFFFF,lsl 16'
/tmp/cc165hIG.s:18: Error: too many memory references for `add'
/tmp/cc165hIG.s:19: Error: too many memory references for `and'
/tmp/cc165hIG.s:20: Error: too many memory references for `mov'

/tmp/cc165hIG.s:21: Error: too many memory references for `mov'
/tmp/cc165hIG.s:22: Error: too many memory references for `mov'
/tmp/cc165hIG.s:23: Error: no such instruction: `b _start_in_C_linux'
Makefile:8044: recipe for target 'libnolto_coregrind_arm64_linux_a-m_main.o' failed
make[4]: *** [libnolto_coregrind_arm64_linux_a-m_main.o] Error 1

0 Kudos
dvorkin2000
Visitor
Visitor
502 Views
Registered: ‎12-17-2019

It seems you did not setup correct HOST parameter. See my makefile please, target do_config

0 Kudos