ankohuu opened a new pull request, #3447:
URL: https://github.com/apache/nuttx-apps/pull/3447

   ## Summary
   
     The patch step in `canutils/lely-canopen` currently uses a phony target, 
so it
     is re-executed when the build is repeated in the same source tree.
   
     When that happens, `patch -N` detects that the patches were already 
applied and
     returns `1`. Although this is treated as a non-fatal condition by `patch`,
     `make` treats it as an error and aborts the build.
   
     Replace the phony patch target with a stamped `.patched` file so the patch 
step
     is not re-run unnecessarily on subsequent builds.
   
     Fixes #3188
   
   ## Impact
   
     `canutils/lely-canopen` third-party `lely-core` make process.
   
   ## Testing
   I confirm that changes are verified on local setup and works as intended:
     - Build Host(s): OS (Linux 6.17.0-1012-oem #12-Ubuntu SMP 
PREEMPT_DYNAMIC), CPU(Intel(R) Core(TM) Ultra 5 235U), 
compiler(arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi)
     - Target(s): arch(ARMv7-A), board:qemu-armv7a
     
     Configuration used:
     ```
     rg LELY .config
     1503:CONFIG_CANUTILS_LELYCANOPEN=y
     
1504:CONFIG_CANUTILS_LELYCANOPEN_URL="https://gitlab.com/lely_industries/lely-core/-/archive/master/";
     
1505:CONFIG_CANUTILS_LELYCANOPEN_VERSION="637de61625c9e8af2b9598109d6fb0e3a2829ce6"
     ```
     
     Command:
     ```
     make -C /home/ankohuu/Project/nuttx-apps/canutils/lely-canopen 
APPDIR=/home/ankohuu/Project/nuttx-apps TOPDIR=/home/ankohuu/Project/nuttx 
context V=1
     ```
   
     Before the patch, re-running the patch step failed:
     ```
     First run completed successfully.
     Second run failed with:
   
     make: Entering directory 
'/home/ankohuu/Project/nuttx-apps/canutils/lely-canopen'
     Unpacking: lely-core-637de61625c9e8af2b9598109d6fb0e3a2829ce6.tar.gz -> 
lely-core-master-  637de61625c9e8af2b9598109d6fb0e3a2829ce6
     tar -zxf lely-core-637de61625c9e8af2b9598109d6fb0e3a2829ce6.tar.gz
     # Get the name of the directory created by the tar command
     mv lely-core-master-88848aa28599ea5d6d7e766a9ffa2054446821b5 lely-core
     cat 0001-tools-eliminate-multiple-definitions-of-poll-compile.patch | 
patch -s -N -d lely-core -p1
     Reversed (or previously applied) patch detected!  Skipping patch.
     1 out of 1 hunk ignored -- saving rejects to file tools/can2udp.c.rej
     Reversed (or previously applied) patch detected!  Skipping patch.
     1 out of 1 hunk ignored -- saving rejects to file tools/cocatd.c.rej
     Reversed (or previously applied) patch detected!  Skipping patch.
     1 out of 1 hunk ignored -- saving rejects to file tools/coctl.c.rej
     make: *** [Makefile:186: patch_src] Error 1
     make: Leaving directory 
'/home/ankohuu/Project/nuttx-apps/canutils/lely-canopen'
     ```
   
     Test logs after the patch:
     ```
     make: Entering directory 
'/home/ankohuu/Project/nuttx-apps/canutils/lely-canopen'
     make: Nothing to be done for 'context'.
     make: Leaving directory 
'/home/ankohuu/Project/nuttx-apps/canutils/lely-canopen'
     ```
   
     Full build logs:
     ```
     make
     Create version.h
     LN: platform/board to /home/ankohuu/Project/nuttx-apps/platform/dummy
     Register: coremark
     Register: hello
     Register: dd
     Register: gprof
     Register: nsh
     Register: sh
     Register: ostest
     Register: getprime
     CPP:  
/home/ankohuu/Project/nuttx/boards/arm/qemu/qemu-armv7a/scripts/dramboot.ld->   
/home/ankohuu/Project/nuttx/boards/arm/qemu/qemu-armv7a/scripts/dLD: nuttx
     arm-none-eabi-ld: warning: /home/ankohuu/Project/nuttx/nuttx has a LOAD 
segment with RWX permissions
     Memory region         Used Size  Region Size  %age Used
                ROM:      275600 B         1 MB     26.28%
                RAM:         16 KB        16 MB      0.10%
     arm-none-eabi-ld: warning: /home/ankohuu/Project/nuttx/nuttx has a LOAD 
segment with RWX permissions
     Memory region         Used Size  Region Size  %age Used
                ROM:      306704 B         1 MB     29.25%
                RAM:         28 KB        16 MB      0.17%
     arm-none-eabi-ld: warning: /home/ankohuu/Project/nuttx/nuttx has a LOAD 
segment with RWX permissions
     Memory region         Used Size  Region Size  %age Used
                ROM:      306704 B         1 MB     29.25%
                RAM:         28 KB        16 MB      0.17%
     arm-none-eabi-ld: warning: /home/ankohuu/Project/nuttx/nuttx has a LOAD 
segment with RWX permissions
     Memory region         Used Size  Region Size  %age Used
                ROM:      306704 B         1 MB     29.25%
                RAM:         28 KB        16 MB      0.17%
     CP: nuttx.bin
   
     ar t /home/ankohuu/Project/nuttx-apps/libapps.a | grep lely
     buf.c.home.ankohuu.Project.nuttx-apps.canutils.lely-canopen_1.o
     msg.c.home.ankohuu.Project.nuttx-apps.canutils.lely-canopen_1.o
     more..
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to