You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello.
I have this error compiling one proyect in windows 10.:
My platformio.ini has this flag that complile ok under linux :
build_flags =
${common.build_flags}
-D USER_SETUP_LOADED=1
-include /$PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
If I changue this line:
-include /$PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
by this other:
-include $PROJECT_LIBDEPS_DIR/$PIOENV/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
The proyect compile under windows 10 + vscode +platformio.
But not compile under linux. It is neccesary to put " / " to compile it.
There is an issue with platformio that cause this fault?
-include
.pio/libdeps/${PIOENV}/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
El lun, 3 jul 2023 a las 16:25, Roberto Fernandez ***@***.***>)
escribió:
I've tested with PlatformIO Core, version 6.1.9a1 as 6.1.8 has broken our build system entirely and I still have an include error issue. Our build flags have a relative path in them as the PlatformIO docs say
Process file as if #include "file" appeared as the first line of the primary source file.
However, the build system prepends the builder path directory as an absolute path to the include file, when it is actually in our PROJECT_DIR/include, which is already in -Iinclude
I apologize for my error, but I have misspoken in my previous message. The builder does properly support it if I supply an absolute path for the include file via a variable, but does not leave relative paths alone. It expands the relative path into the builder directory.
I do not have a simple project to supply. I can work around this in our project by supplying the full path the -include file but that's a real problem because we'd now have to go back and cut new version of all our supported older versions so the build works again.
The builder code here does not fire because the relative path does not exist (platformio/builder/tools/piobuild.py)
if os.path.exists(p):
result["CCFLAGS"][i] = (f[0], os.path.abspath(p))
In 6.1.8 it worked though, and for years it has worked. Not to be too snarky because I appreciate your help, but
Process file as if #include "file" appeared as the first line of the primary source file.
This file is in the include path and therefore should have no issue being included, so long as an absolute path was not added to it. Is there any way this can not be processed and have a bogus path added to it?
Activity
roberbike commentedon Jul 3, 2023
roberbike commentedon Jul 3, 2023
This works under linux and windows:
-include .pio/libdeps/${PIOENV}/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
roberbike commentedon Jul 3, 2023
ivankravets commentedon Jul 3, 2023
Sorry, I deleted my previous comment. This is actually a bug and we will fix it ASAP.
ivankravets commentedon Jul 3, 2023
Thanks for the report. Please re-test with
pio upgrade --dev.CapnBry commentedon Jul 5, 2023
I've tested with
PlatformIO Core, version 6.1.9a1as 6.1.8 has broken our build system entirely and I still have an include error issue. Our build flags have a relative path in them as the PlatformIO docs sayHowever, the build system prepends the builder path directory as an absolute path to the include file, when it is actually in our
PROJECT_DIR/include, which is already in-IincludeBuild output
Should I open a new issue for this or keep it here?
ivankravets commentedon Jul 5, 2023
Could you provide a simple project (zip archive attached here) to reproduce this issue?
CapnBry commentedon Jul 5, 2023
I apologize for my error, but I have misspoken in my previous message. The builder does properly support it if I supply an absolute path for the include file via a variable, but does not leave relative paths alone. It expands the relative path into the builder directory.
I do not have a simple project to supply. I can work around this in our project by supplying the full path the
-includefile but that's a real problem because we'd now have to go back and cut new version of all our supported older versions so the build works again.The builder code here does not fire because the relative path does not exist (
platformio/builder/tools/piobuild.py)ivankravets commentedon Jul 5, 2023
Please provide the 1 line from
platformio.iniwhich works and another one that does not.CapnBry commentedon Jul 5, 2023
working
not working (what we had before
ivankravets commentedon Jul 5, 2023
You need
The
cwdis the project root dir.CapnBry commentedon Jul 5, 2023
Oh I see! I appreciate that.
In 6.1.8 it worked though, and for years it has worked. Not to be too snarky because I appreciate your help, but
This file is in the include path and therefore should have no issue being included, so long as an absolute path was not added to it. Is there any way this can not be processed and have a bogus path added to it?
ivankravets commentedon Jul 5, 2023
I think we can improve this behavior. I reopen this issue.
ivankravets commentedon Jul 5, 2023
Or, could I ask you to create a new issue and refer to this one? It's better for history.
CapnBry commentedon Jul 5, 2023
Can do, will tag this issue in it too.
Resolved a critical issue related to the usage of the ``-include`` fl…