MDK-Packs / CB_Lab4Layer

CMSIS-Build Lab with Layers
4 stars 9 forks source link

Segmentation fault encountered when trying to build a project with cmsis-build0.10 #1

Open fred-r opened 3 years ago

fred-r commented 3 years ago

Hi,

I have installed CMSIS-Build 0.10.0 and tried to play around with the CB_Lab4Layer code.

I can successfully generate a cprj file as shown below:

$ ./gen_proj.sh App=AWS_MQTT_Demo Board=32F746GDISCOVERY Module=ESP8266 Socket=WiFi RTOS=RTX --layer=../Layer Generate project from layers Output: AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX Project: AWS_MQTT_Demo.cprj (cbuildgen): Build Process Manager 0.10.0 (C) 2020 ARM M650: Command completed successfully.

But when trying to build the project I face a segmentation fault at the packlist stage:

$ cbuild.sh AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX/AWS_MQTT_Demo.cprj (cbuild.sh): Build Invocation 0.10.0 (C) 2020 ARM xmllint was not found, proceed without xml validation /c/cbuild10/bin/cbuild.sh: line 265: 260836 Segmentation fault cbuildgen packlist "${projectdir}${project}.cprj" --toolchain="${toolchain}" --outdir="${outdir}" --intdir="${intdir}" ${quiet_opt}

Do you have any hints to solve this issue ?

Thanks & Regards, F

red

brondani commented 3 years ago

Hi Fred,

Thanks for reporting it! Could you please help me to reproduce the issue?

Thanks a lot Daniel

jeromecoutant commented 3 years ago

Hi Daniel

Maybe one general comment not related to this specific issue at all... :-)

* Using a clean pack repository are you able to build the project?

It could be good if we are able to track changes from a "clean" pack ? And maybe a new command to force pack download in order to clean directory could be good also ? Regards, Jerome

brondani commented 3 years ago

Hi Jerome,

Thanks for the suggestions, we will take it in consideration.

Best regards Daniel

fred-r commented 3 years ago

Hi Daniel,

thanks for taking my issue into account. Here is the output of my attempt with a "clean" pack repository:

$ cp_init.sh /c/tmpPackDir (cp_init.sh): Setup Pack Directory 0.10.0 (C) 2020 ARM info: reading directory: /c/tmpPackDir downloading package index file from ######################################################################## 100,0% pack repository created successfully please setup environment variable CMSIS_PACK_ROOT to:

$ export CMSIS_PACK_ROOT=/c/tmpPackDir

$ cbuild.sh AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX/AWS_MQTT_Demo.cprj (cbuild.sh): Build Invocation 0.10.0 (C) 2020 ARM xmllint was not found, proceed without xml validation (cbuildgen): Build Process Manager 0.10.0 (C) 2020 ARM M654: URL 'http://www.keil.com/pack/ARM.mbedTLS.1.6.1.pack' was added to the list of missing packages. M654: URL 'https://github.com/MDK-Packs/Pack/raw/master/AWS_IoT_Device/MDK-Packs.AWS_IoT_Device.2.0.0-beta.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/ARM.CMSIS-Driver.2.6.1.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/ARM.CMSIS.5.7.0.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/Keil.ARM_Compiler.1.6.3.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/Keil.STM32F7xx_DFP.2.13.0.pack' was added to the list of missing packages. M654: URL 'http://www.keil.com/pack/Keil.STM32L4xx_DFP.2.4.0.pack' was added to the list of missing packages. M654: URL 'https://github.com/MDK-Packs/Pack/raw/master/IoT_Socket/MDK-Packs.IoT_Socket.1.2.1.pack' was added to the list of missing packages. M650: Command completed successfully. dos2unix: converting file /c/GitHub/CB_Lab4Layer/build/AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX/Objects/AWS_MQTT_Demo.cpinstall to Unix format... (cp_install.sh): Install Packs 0.10.0 (C) 2020 ARM info: reading file: /c/GitHub/CB_Lab4Layer/build/AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX/Objects/AWS_MQTT_Demo.cpinstall dos2unix: converting file /c/GitHub/CB_Lab4Layer/build/AWS_MQTT_Demo/32F746GDISCOVERY_ESP8266_WiFi_RTX/Objects/AWS_MQTT_Demo.cpinstall to Unix format... http://www.keil.com/pack/ARM.mbedTLS.1.6.1.pack ######################################################################## 100,0% curl: (7) Unsupported proxy scheme for .......

So it looks better now, I get the list of missing packs. Then I face a proxy issue but I guess this is linked ot our IT infrastructure which is too restrictive.

Otherwise, regarding your other questions:

Thanks & Regards, Fred

content.txt

jeromecoutant commented 3 years ago

Note for Fred: In ST network, you have to add --insecure parameter to curl commands in scripts.

brondani commented 3 years ago

Hi Fred,

Thanks for the answer. Unfortunately I still cannot reproduce the issue. Would it be possible to share the full pack directory somewhere? You can find my email address in my GitHub profile.

Thanks Daniel

fred-r commented 3 years ago

Hi Daniel,

it is quite huge but I will do so. I'll send you a link by email.

Thanks & Regards, Fred

brondani commented 3 years ago

Many thanks to Fred for the feedback, it turned out the segmentation fault was caused by an unexpected corrupted pack index (PACK/.Web/index.pidx file), it was probably overwritten by a firewall tool due to its actual content. The cbuildgen is being updated to handle this case, avoiding the segmentation fault and printing error messages. It will be available in the next public release.

@jeromecoutant: the curl --insecure option should already be set in the cp_init.sh and cp_install.sh scripts: according to the curl usage, the -k option is equivalent to --insecure.

Best regards Daniel

jeromecoutant commented 3 years ago

@jeromecoutant: the curl --insecure option should already be set in the cp_init.sh and cp_install.sh scripts: according to the curl usage, the -k option is equivalent to --insecure.

OK @tarek-bochkati we need to update to 0.10 version