All of lore.kernel.org
 help / color / mirror / Atom feed
* [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
@ 2018-10-02 11:36 Jacob Stiffler
  2018-10-02 12:29 ` Jacob Stiffler
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2018-10-02 11:36 UTC (permalink / raw)
  To: meta-ti

* Prevent a potential error as mklib will return an error if the
  library already exists.
* The error encountered is the following:

| >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
| WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
---
 recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
index b9f7566..e83973b 100644
--- a/recipes-ti/devtools/ti-cgt-arm.inc
+++ b/recipes-ti/devtools/ti-cgt-arm.inc
@@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
 
 S = "${WORKDIR}/ti-cgt-arm-${PV}"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
 
@@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
 
 do_compile_append() {
     cd ${S}/ti-cgt-arm_${PV}.LTS
-    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
-    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
+
+    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
+    then
+        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
+        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
+    fi
 }
 
 do_install() {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-02 11:36 [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library Jacob Stiffler
@ 2018-10-02 12:29 ` Jacob Stiffler
  2018-10-02 18:38   ` Jacob Stiffler
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2018-10-02 12:29 UTC (permalink / raw)
  To: meta-ti

[-- Attachment #1: Type: text/plain, Size: 1896 bytes --]

I recently ran into this error, so I sent this out in a hurry to get it 
fixed. But now I am thinking that it may be better to remove this 
library in do_configure, similar to base class calls make clean

Any suggestions?


Thanks,

Jake

On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
> * Prevent a potential error as mklib will return an error if the
>    library already exists.
> * The error encountered is the following:
>
> | >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
> | WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
>
> Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
> ---
>   recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
> index b9f7566..e83973b 100644
> --- a/recipes-ti/devtools/ti-cgt-arm.inc
> +++ b/recipes-ti/devtools/ti-cgt-arm.inc
> @@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
>   
>   S = "${WORKDIR}/ti-cgt-arm-${PV}"
>   
> -PR = "r1"
> +PR = "r2"
>   
>   SRC_URI = "http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
>   
> @@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
>   
>   do_compile_append() {
>       cd ${S}/ti-cgt-arm_${PV}.LTS
> -    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> -    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> +
> +    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
> +    then
> +        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> +        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> +    fi
>   }
>   
>   do_install() {

[-- Attachment #2: Type: text/html, Size: 20823 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-02 12:29 ` Jacob Stiffler
@ 2018-10-02 18:38   ` Jacob Stiffler
  2018-10-02 19:17     ` Denys Dmytriyenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2018-10-02 18:38 UTC (permalink / raw)
  To: meta-ti

[-- Attachment #1: Type: text/plain, Size: 2366 bytes --]


On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
>
> I recently ran into this error, so I sent this out in a hurry to get 
> it fixed. But now I am thinking that it may be better to remove this 
> library in do_configure, similar to base class calls make clean
>

After thinking about it some more, I would prefer to remove the library 
in do_configure() to be safe in the unlikely scenario that there are 
dependencies involved.


As it is now, this is hardcoded to a single library. While I am making 
changes, should I enhance this to take a list of libraries so that it 
can be easily extended in the future?


> Any suggestions?
>
>
> Thanks,
>
> Jake
>
> On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
>> * Prevent a potential error as mklib will return an error if the
>>    library already exists.
>> * The error encountered is the following:
>>
>> | >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
>> | WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
>>
>> Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
>> ---
>>   recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
>> index b9f7566..e83973b 100644
>> --- a/recipes-ti/devtools/ti-cgt-arm.inc
>> +++ b/recipes-ti/devtools/ti-cgt-arm.inc
>> @@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
>>   
>>   S = "${WORKDIR}/ti-cgt-arm-${PV}"
>>   
>> -PR = "r1"
>> +PR = "r2"
>>   
>>   SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
>>   
>> @@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
>>   
>>   do_compile_append() {
>>       cd ${S}/ti-cgt-arm_${PV}.LTS
>> -    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>> -    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>> +
>> +    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
>> +    then
>> +        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>> +        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>> +    fi
>>   }
>>   
>>   do_install() {

[-- Attachment #2: Type: text/html, Size: 21757 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-02 18:38   ` Jacob Stiffler
@ 2018-10-02 19:17     ` Denys Dmytriyenko
  2018-10-02 19:19       ` Jacob Stiffler
  0 siblings, 1 reply; 8+ messages in thread
From: Denys Dmytriyenko @ 2018-10-02 19:17 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-ti

I believe this mklib call was added recently due to a race condition and it 
was not built before it was needed - any chance to fix the race properly 
instead of all the workarounds?


On Tue, Oct 02, 2018 at 02:38:00PM -0400, Jacob Stiffler wrote:
> 
> On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
> >
> >I recently ran into this error, so I sent this out in a hurry to get it
> >fixed. But now I am thinking that it may be better to remove this library
> >in do_configure, similar to base class calls make clean
> >
> 
> After thinking about it some more, I would prefer to remove the library in
> do_configure() to be safe in the unlikely scenario that there are
> dependencies involved.
> 
> 
> As it is now, this is hardcoded to a single library. While I am making
> changes, should I enhance this to take a list of libraries so that it can be
> easily extended in the future?
> 
> 
> >Any suggestions?
> >
> >
> >Thanks,
> >
> >Jake
> >
> >On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
> >>* Prevent a potential error as mklib will return an error if the
> >>   library already exists.
> >>* The error encountered is the following:
> >>
> >>| >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
> >>| WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
> >>
> >>Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
> >>---
> >>  recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
> >>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
> >>index b9f7566..e83973b 100644
> >>--- a/recipes-ti/devtools/ti-cgt-arm.inc
> >>+++ b/recipes-ti/devtools/ti-cgt-arm.inc
> >>@@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
> >>  S = "${WORKDIR}/ti-cgt-arm-${PV}"
> >>-PR = "r1"
> >>+PR = "r2"
> >>  SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
> >>@@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
> >>  do_compile_append() {
> >>      cd ${S}/ti-cgt-arm_${PV}.LTS
> >>-    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>-    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>+
> >>+    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
> >>+    then
> >>+        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>+        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>+    fi
> >>  }
> >>  do_install() {

> -- 
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-02 19:17     ` Denys Dmytriyenko
@ 2018-10-02 19:19       ` Jacob Stiffler
  2018-10-03 17:17         ` Denys Dmytriyenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2018-10-02 19:19 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti


On 10/2/2018 3:17 PM, Denys Dmytriyenko wrote:
> I believe this mklib call was added recently due to a race condition and it
> was not built before it was needed - any chance to fix the race properly
> instead of all the workarounds?


Not sure about fixing the race, but I just found out that there are 
plans to have that library available in the default package.


>
> On Tue, Oct 02, 2018 at 02:38:00PM -0400, Jacob Stiffler wrote:
>> On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
>>> I recently ran into this error, so I sent this out in a hurry to get it
>>> fixed. But now I am thinking that it may be better to remove this library
>>> in do_configure, similar to base class calls make clean
>>>
>> After thinking about it some more, I would prefer to remove the library in
>> do_configure() to be safe in the unlikely scenario that there are
>> dependencies involved.
>>
>>
>> As it is now, this is hardcoded to a single library. While I am making
>> changes, should I enhance this to take a list of libraries so that it can be
>> easily extended in the future?
>>
>>
>>> Any suggestions?
>>>
>>>
>>> Thanks,
>>>
>>> Jake
>>>
>>> On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
>>>> * Prevent a potential error as mklib will return an error if the
>>>>    library already exists.
>>>> * The error encountered is the following:
>>>>
>>>> | >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
>>>> | WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
>>>>
>>>> Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
>>>> ---
>>>>   recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
>>>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
>>>> index b9f7566..e83973b 100644
>>>> --- a/recipes-ti/devtools/ti-cgt-arm.inc
>>>> +++ b/recipes-ti/devtools/ti-cgt-arm.inc
>>>> @@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
>>>>   S = "${WORKDIR}/ti-cgt-arm-${PV}"
>>>> -PR = "r1"
>>>> +PR = "r2"
>>>>   SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
>>>> @@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
>>>>   do_compile_append() {
>>>>       cd ${S}/ti-cgt-arm_${PV}.LTS
>>>> -    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>>>> -    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>>>> +
>>>> +    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
>>>> +    then
>>>> +        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>>>> +        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>>>> +    fi
>>>>   }
>>>>   do_install() {
>> -- 
>> _______________________________________________
>> meta-ti mailing list
>> meta-ti@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-ti


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-02 19:19       ` Jacob Stiffler
@ 2018-10-03 17:17         ` Denys Dmytriyenko
  2018-10-03 17:29           ` Jacob Stiffler
  0 siblings, 1 reply; 8+ messages in thread
From: Denys Dmytriyenko @ 2018-10-03 17:17 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-ti

On Tue, Oct 02, 2018 at 03:19:00PM -0400, Jacob Stiffler wrote:
> 
> On 10/2/2018 3:17 PM, Denys Dmytriyenko wrote:
> >I believe this mklib call was added recently due to a race condition and it
> >was not built before it was needed - any chance to fix the race properly
> >instead of all the workarounds?
> 
> 
> Not sure about fixing the race, but I just found out that there are plans to
> have that library available in the default package.

So, in the meantime, do we need to merge this workaround?


> >On Tue, Oct 02, 2018 at 02:38:00PM -0400, Jacob Stiffler wrote:
> >>On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
> >>>I recently ran into this error, so I sent this out in a hurry to get it
> >>>fixed. But now I am thinking that it may be better to remove this library
> >>>in do_configure, similar to base class calls make clean
> >>>
> >>After thinking about it some more, I would prefer to remove the library in
> >>do_configure() to be safe in the unlikely scenario that there are
> >>dependencies involved.
> >>
> >>
> >>As it is now, this is hardcoded to a single library. While I am making
> >>changes, should I enhance this to take a list of libraries so that it can be
> >>easily extended in the future?
> >>
> >>
> >>>Any suggestions?
> >>>
> >>>
> >>>Thanks,
> >>>
> >>>Jake
> >>>
> >>>On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
> >>>>* Prevent a potential error as mklib will return an error if the
> >>>>   library already exists.
> >>>>* The error encountered is the following:
> >>>>
> >>>>| >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
> >>>>| WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
> >>>>
> >>>>Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
> >>>>---
> >>>>  recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
> >>>>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>>>
> >>>>diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>index b9f7566..e83973b 100644
> >>>>--- a/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>+++ b/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>@@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
> >>>>  S = "${WORKDIR}/ti-cgt-arm-${PV}"
> >>>>-PR = "r1"
> >>>>+PR = "r2"
> >>>>  SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
> >>>>@@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
> >>>>  do_compile_append() {
> >>>>      cd ${S}/ti-cgt-arm_${PV}.LTS
> >>>>-    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>>>-    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>>>+
> >>>>+    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
> >>>>+    then
> >>>>+        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>>>+        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>>>+    fi
> >>>>  }
> >>>>  do_install() {
> >>-- 
> >>_______________________________________________
> >>meta-ti mailing list
> >>meta-ti@yoctoproject.org
> >>https://lists.yoctoproject.org/listinfo/meta-ti


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-03 17:17         ` Denys Dmytriyenko
@ 2018-10-03 17:29           ` Jacob Stiffler
  2018-10-03 17:31             ` Denys Dmytriyenko
  0 siblings, 1 reply; 8+ messages in thread
From: Jacob Stiffler @ 2018-10-03 17:29 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti


On 10/3/2018 1:17 PM, Denys Dmytriyenko wrote:
> On Tue, Oct 02, 2018 at 03:19:00PM -0400, Jacob Stiffler wrote:
>> On 10/2/2018 3:17 PM, Denys Dmytriyenko wrote:
>>> I believe this mklib call was added recently due to a race condition and it
>>> was not built before it was needed - any chance to fix the race properly
>>> instead of all the workarounds?
>>
>> Not sure about fixing the race, but I just found out that there are plans to
>> have that library available in the default package.
> So, in the meantime, do we need to merge this workaround?


Yes. This will fix the failure when do_compile is re-run on existing 
sources.


Now I think it makes more sense to try to remove the library in 
do_configure, similar to how base.bbclass calls "make clean" if the 
state of the dependencies change.


>
>>> On Tue, Oct 02, 2018 at 02:38:00PM -0400, Jacob Stiffler wrote:
>>>> On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
>>>>> I recently ran into this error, so I sent this out in a hurry to get it
>>>>> fixed. But now I am thinking that it may be better to remove this library
>>>>> in do_configure, similar to base class calls make clean
>>>>>
>>>> After thinking about it some more, I would prefer to remove the library in
>>>> do_configure() to be safe in the unlikely scenario that there are
>>>> dependencies involved.
>>>>
>>>>
>>>> As it is now, this is hardcoded to a single library. While I am making
>>>> changes, should I enhance this to take a list of libraries so that it can be
>>>> easily extended in the future?
>>>>
>>>>
>>>>> Any suggestions?
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jake
>>>>>
>>>>> On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
>>>>>> * Prevent a potential error as mklib will return an error if the
>>>>>>    library already exists.
>>>>>> * The error encountered is the following:
>>>>>>
>>>>>> | >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
>>>>>> | WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
>>>>>>
>>>>>> Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
>>>>>> ---
>>>>>>   recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
>>>>>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
>>>>>> index b9f7566..e83973b 100644
>>>>>> --- a/recipes-ti/devtools/ti-cgt-arm.inc
>>>>>> +++ b/recipes-ti/devtools/ti-cgt-arm.inc
>>>>>> @@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
>>>>>>   S = "${WORKDIR}/ti-cgt-arm-${PV}"
>>>>>> -PR = "r1"
>>>>>> +PR = "r2"
>>>>>>   SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
>>>>>> @@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
>>>>>>   do_compile_append() {
>>>>>>       cd ${S}/ti-cgt-arm_${PV}.LTS
>>>>>> -    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>>>>>> -    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>>>>>> +
>>>>>> +    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
>>>>>> +    then
>>>>>> +        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
>>>>>> +        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
>>>>>> +    fi
>>>>>>   }
>>>>>>   do_install() {
>>>> -- 
>>>> _______________________________________________
>>>> meta-ti mailing list
>>>> meta-ti@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/meta-ti


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library
  2018-10-03 17:29           ` Jacob Stiffler
@ 2018-10-03 17:31             ` Denys Dmytriyenko
  0 siblings, 0 replies; 8+ messages in thread
From: Denys Dmytriyenko @ 2018-10-03 17:31 UTC (permalink / raw)
  To: Jacob Stiffler; +Cc: meta-ti

On Wed, Oct 03, 2018 at 01:29:45PM -0400, Jacob Stiffler wrote:
> 
> On 10/3/2018 1:17 PM, Denys Dmytriyenko wrote:
> >On Tue, Oct 02, 2018 at 03:19:00PM -0400, Jacob Stiffler wrote:
> >>On 10/2/2018 3:17 PM, Denys Dmytriyenko wrote:
> >>>I believe this mklib call was added recently due to a race condition and it
> >>>was not built before it was needed - any chance to fix the race properly
> >>>instead of all the workarounds?
> >>
> >>Not sure about fixing the race, but I just found out that there are plans to
> >>have that library available in the default package.
> >So, in the meantime, do we need to merge this workaround?
> 
> 
> Yes. This will fix the failure when do_compile is re-run on existing
> sources.
> 
> 
> Now I think it makes more sense to try to remove the library in
> do_configure, similar to how base.bbclass calls "make clean" if the state of
> the dependencies change.

Sounds good, let's "clean" the library before rebuild.


> >>>On Tue, Oct 02, 2018 at 02:38:00PM -0400, Jacob Stiffler wrote:
> >>>>On 10/2/2018 8:29 AM, Jacob Stiffler wrote:
> >>>>>I recently ran into this error, so I sent this out in a hurry to get it
> >>>>>fixed. But now I am thinking that it may be better to remove this library
> >>>>>in do_configure, similar to base class calls make clean
> >>>>>
> >>>>After thinking about it some more, I would prefer to remove the library in
> >>>>do_configure() to be safe in the unlikely scenario that there are
> >>>>dependencies involved.
> >>>>
> >>>>
> >>>>As it is now, this is hardcoded to a single library. While I am making
> >>>>changes, should I enhance this to take a list of libraries so that it can be
> >>>>easily extended in the future?
> >>>>
> >>>>
> >>>>>Any suggestions?
> >>>>>
> >>>>>
> >>>>>Thanks,
> >>>>>
> >>>>>Jake
> >>>>>
> >>>>>On 10/2/2018 7:36 AM, Jacob Stiffler wrote:
> >>>>>>* Prevent a potential error as mklib will return an error if the
> >>>>>>   library already exists.
> >>>>>>* The error encountered is the following:
> >>>>>>
> >>>>>>| >> ERROR: mklib: destination library .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/ti-cgt-arm-16.9.2/ti-cgt-arm_16.9.2.LTS/lib/rtsv7R4_A_le_v3D16_eabi.lib already exists
> >>>>>>| WARNING: .../work/x86_64-linux/ti-cgt-arm-native/16.9.2-r1/temp/run.do_compile.13758:1 exit 1 from 'lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib'
> >>>>>>
> >>>>>>Signed-off-by: Jacob Stiffler<j-stiffler@ti.com>
> >>>>>>---
> >>>>>>  recipes-ti/devtools/ti-cgt-arm.inc | 10 +++++++---
> >>>>>>  1 file changed, 7 insertions(+), 3 deletions(-)
> >>>>>>
> >>>>>>diff --git a/recipes-ti/devtools/ti-cgt-arm.inc b/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>>>index b9f7566..e83973b 100644
> >>>>>>--- a/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>>>+++ b/recipes-ti/devtools/ti-cgt-arm.inc
> >>>>>>@@ -9,7 +9,7 @@ require recipes-ti/includes/ti-paths.inc
> >>>>>>  S = "${WORKDIR}/ti-cgt-arm-${PV}"
> >>>>>>-PR = "r1"
> >>>>>>+PR = "r2"
> >>>>>>  SRC_URI ="http://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/${PV}.LTS/${BINFILE};name=${BINFILE_NAME}"
> >>>>>>@@ -19,8 +19,12 @@ TI_BIN_UNPK_CMDS = ""
> >>>>>>  do_compile_append() {
> >>>>>>      cd ${S}/ti-cgt-arm_${PV}.LTS
> >>>>>>-    export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>>>>>-    lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>>>>>+
> >>>>>>+    if [ ! -f "./lib/rtsv7R4_A_le_v3D16_eabi.lib" ]
> >>>>>>+    then
> >>>>>>+        export PATH=${PATH}:${S}/ti-cgt-arm_${PV}.LTS/bin
> >>>>>>+        lib/mklib --pattern=rtsv7R4_A_le_v3D16_eabi.lib
> >>>>>>+    fi
> >>>>>>  }
> >>>>>>  do_install() {
> >>>>-- 
> >>>>_______________________________________________
> >>>>meta-ti mailing list
> >>>>meta-ti@yoctoproject.org
> >>>>https://lists.yoctoproject.org/listinfo/meta-ti


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-03 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 11:36 [ti2018.03/rocko/master][PATCH] ti-cgt-arm: prevent build of existing library Jacob Stiffler
2018-10-02 12:29 ` Jacob Stiffler
2018-10-02 18:38   ` Jacob Stiffler
2018-10-02 19:17     ` Denys Dmytriyenko
2018-10-02 19:19       ` Jacob Stiffler
2018-10-03 17:17         ` Denys Dmytriyenko
2018-10-03 17:29           ` Jacob Stiffler
2018-10-03 17:31             ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.