xmake outputs wrong relative path to files with errors

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
jorsc
Member++
Posts: 20
Joined: Fri May 05, 2017 1:39 pm

xmake outputs wrong relative path to files with errors

Postby jorsc » Mon Jun 17, 2019 8:21 am

Hello,
I can't figure this out.

If I have a project structure like this:
MyProject/
|-Makefile
|-src/main.xc
I then set my cwd in MyProject/ and run xmake. With no errors, the project is builds fine.
However if my main.xc has en error. The error is refer to main.xc as "../src/main.xc:7:2: error: <some error>"

Clearly the "../src/main.xc" does not refer to the correct path from where I have my cwd.

I also noticed that whenever I have library dependencies, they will refer to error with absolute paths and is thus OK.
Is there some way I can force xmake to always output absolute paths?

I have looked and looked in the command line manual but can't find any option that resolves this.
User avatar
mon2
XCore Legend
Posts: 1567
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Mon Jun 17, 2019 11:52 am

Hi. Perhaps the following thread will help:

viewtopic.php?t=234
jorsc
Member++
Posts: 20
Joined: Fri May 05, 2017 1:39 pm

Postby jorsc » Tue Jun 18, 2019 8:18 am

Thanks, it seems that specifying the SOURCE_DIRS and INCLUDE_DIRS variables does help.
Unfortunately I then get other build issues.
Like this for every file:

Code: Select all

warning: ignoring old commands for target `.build_Release/import/lib_dsp/src/fft/dsp_fft_inverse.S.pca.xml.decouple
And an error:

Code: Select all

xcc: error: multiple xn source files supplied (".././src/XU216-512-TQ128-C20.xn") and (".././src/XU216-512-TQ128-C20.xn")
As a workaround I came up with this solution (using sed to substitute ../src to ./src):

Code: Select all

xmake 2>&1 | sed -E 's/\.\.\/src/\.\/src/g'
..a bit ugly but works for now.

Who is online

Users browsing this forum: No registered users and 0 guests