UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ralphkw1
Observer
2,682 Views
Registered: ‎10-15-2015

Baffled with Petalinux 17.2 build process

Jump to solution

I would really like to have the ability to do simple compiles either command line or eclipse for development purposes. I know I will need to do the proper image creation using petalinx-build when testing my changes. But I do a lot of incremental builds while developing and yocto is just too darn slow. So I did a full build which was successful, and I looked at the log.do_compile. It has two lines as follows.

 

arm-xilinx-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/zc706/build/tmp/sysroots/plnx_arm -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/opt/zc706/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/system-server/1.0-r0=/usr/src/debug/system-server/1.0-r0 -fdebug-prefix-map=/opt/zc706/build/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/opt/zc706/build/tmp/sysroots/plnx_arm= -fvisibility-inlines-hidden -std=gnu++11 -c -o system_server.o system_server.cpp
arm-xilinx-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/zc706/build/tmp/sysroots/plnx_arm -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o system-server system_server.o -lrt -lpthread -lpmq

 

So in the same build window I tried to execute those two lines exactly as the log shows. The compile works, but the link gives me these errors as follows. Mind you that the petalinux-build with the exact same files (the result in the log file) works fine. So what gives? If it works with the petalinux build, should I not be able to execute the logged compile and link and get the same result? Yocto is a never ending cluster puck it seems...

 

rkwilliamson@ubuntu:/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files$ arm-xilinx-linux-gnueabi-g++ -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/zc706/build/tmp/sysroots/plnx_arm -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o system-server system_server.o -lrt -lpthread -lpmq
/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/../../../../arm-xilinx-linux-gnueabi/bin/ld: error: system-server uses VFP register arguments, /opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/crtbegin.o does not
/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/../../../../arm-xilinx-linux-gnueabi/bin/ld: failed to merge target specific data of file /opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/crtbegin.o
/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/../../../../arm-xilinx-linux-gnueabi/bin/ld: error: system-server uses VFP register arguments, /opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/crtend.o does not
/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/../../../../arm-xilinx-linux-gnueabi/bin/ld: failed to merge target specific data of file /opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.9.2/crtend.o
system_server.o: In function `system_server::init()':
/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files/system_server.cpp:314: undefined reference to `system_command(SYSTEM_COMMAND_PARAMETERS, SYSTEM_COMMAND_PARAMETERS, char const*)'
/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files/system_server.cpp:314: undefined reference to `system_command(SYSTEM_COMMAND_PARAMETERS, SYSTEM_COMMAND_PARAMETERS, char const*)'
system_server.o: In function `system_server::post_init()':
/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files/system_server.cpp:397: undefined reference to `system_command(SYSTEM_COMMAND_PARAMETERS, SYSTEM_COMMAND_PARAMETERS, char const*)'
/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files/system_server.cpp:398: undefined reference to `system_command(SYSTEM_COMMAND_PARAMETERS, SYSTEM_COMMAND_PARAMETERS, char const*)'
system_server.o: In function `system_server::shutdown_with_log(int, int, int, std::string)':
/opt/zc706/project-spec/meta-user/recipes-apps/system-server/files/system_server.cpp:890: undefined reference to `system_command(SYSTEM_COMMAND_PARAMETERS, SYSTEM_COMMAND_PARAMETERS, char const*)'
collect2: error: ld returned 1 exit status

0 Kudos
1 Solution

Accepted Solutions
Voyager
Voyager
4,821 Views
Registered: ‎06-24-2013

Re: Baffled with Petalinux 17.2 build process

Jump to solution

Hey @ralphkw1,

 

Looks to me like a problem with different environments, more specifically the PATH environment variable could differ between the two invocations resulting in different compiler/linker being executed with different defaults.

 

Probably the best approach is to output the environment in the script and compare it to your build window environment.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
4 Replies
Voyager
Voyager
4,822 Views
Registered: ‎06-24-2013

Re: Baffled with Petalinux 17.2 build process

Jump to solution

Hey @ralphkw1,

 

Looks to me like a problem with different environments, more specifically the PATH environment variable could differ between the two invocations resulting in different compiler/linker being executed with different defaults.

 

Probably the best approach is to output the environment in the script and compare it to your build window environment.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Observer ralphkw1
Observer
2,580 Views
Registered: ‎10-15-2015

Re: Baffled with Petalinux 17.2 build process

Jump to solution

Thanks 'hpoetzl' for the tip. It was not the PATH but some other environment variable. I added 'printenv' to the makefile and during the yocto build, it saved the environment to log.do_compile. I then imported this environment to bash and did the compile. It worked. So I am not sure which variable(s) are necessary, but that was the solution.

0 Kudos
Voyager
Voyager
2,578 Views
Registered: ‎06-24-2013

Re: Baffled with Petalinux 17.2 build process

Jump to solution

You're welcome!

 

All the best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Adventurer
Adventurer
2,285 Views
Registered: ‎10-04-2017

Re: Baffled with Petalinux 17.2 build process

Jump to solution
Have you tried building the recipe with -c devshell? I haven't tried this but saw it when reading through the docs. Is supposed to put you in a shell in the yocto build environment that is fully initialized.

jeff
0 Kudos