Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW#27900] Error Kconfig and Makefile when build eclipse #2812

Closed
kakaducsy opened this issue Dec 10, 2018 · 13 comments
Closed

[TW#27900] Error Kconfig and Makefile when build eclipse #2812

kakaducsy opened this issue Dec 10, 2018 · 13 comments

Comments

@kakaducsy
Copy link

kakaducsy commented Dec 10, 2018

image

I try to build project with eclipse but error as bellow:

Traceback (most recent call last): File "C:/msys32/home/sy.nguyen-duc/esp/esp-idf/tools/ldgen/ldgen.py", line 114, in <module> main() File "C:/msys32/home/sy.nguyen-duc/esp/esp-idf/tools/ldgen/ldgen.py", line 98, in main sdkconfig = SDKConfig(kconfig_file, config_file, args.env) File "C:/msys32/home/sy.nguyen-duc/esp/esp-idf/tools/ldgen/sdkconfig.py", line 54, in __init__ self.config = kconfiglib.Kconfig(kconfig_file.name) File "C:\msys32\home\sy.nguyen-duc\esp\esp-idf\tools\kconfig_new/kconfiglib.py", line 653, in __init__ self.top_node) # prev_node File "C:\msys32\home\sy.nguyen-duc\esp\esp-idf\tools\kconfig_new/kconfiglib.py", line 1546, in _parse_block self._enter_file(sourced_file) File "C:\msys32\home\sy.nguyen-duc\esp\esp-idf\tools\kconfig_new/kconfiglib.py", line 1130, in _enter_file .format(self._filename, self._linenr, e.message)) IOError: C:/msys32/home/sy.nguyen-duc/esp/esp-idf/Kconfig:59: Could not open '/home/sy.nguyen-duc/esp/esp-idf/components/app_update/Kconfig.projbuild' (ENOENT: No such file or directory). Perhaps the $srctree environment variable (which was unset) is set incorrectly. Note that the current value of $srctree is saved when the Kconfig instance is created (for consistency and to cleanly separate instances). Also note that e.g. $FOO in a 'source' statement does not refer to the environment variable FOO, but rather to the Kconfig Symbol FOO (which would commonly have 'option env="FOO"' in its definition). cygpath: error converting "/c/Users/sy.nguyen-duc/Desktop/workpace/HelloWorld/build/esp_https_ota/libesp_https_ota.a.sections_info\n" - Not a directory make: *** [/home/sy.nguyen-duc/esp/esp-idf/components/esp32/Makefile.projbuild:51: /c/Users/sy.nguyen-duc/Desktop/workpace/HelloWorld/build/esp32/esp32.common.ld] Error 1

Can you help me to resolve? Thanks all

@ziolelle
Copy link

Same for me

@SMHRambo
Copy link

me too

@Alvin1Zhang Alvin1Zhang changed the title Error Kconfig and Makefile when build eclipse [TW#27900] Error Kconfig and Makefile when build eclipse Dec 12, 2018
@kakaducsy
Copy link
Author

kakaducsy commented Dec 12, 2018

Hi @ziolelle @SMHRambo
What is the your folder name? ( I scared "sy.nguyen-duc" contains special characters . and - )
Although, Eclipse error but use mingw32.exe it's ok.

@SMHRambo
Copy link

SMHRambo commented Dec 12, 2018

my path is "E:\Entwicklungsumgebung\ESP32\home\sascha\esp\esp-idf"
But if i check out the "ESP-IDF Release v3.1.1" branch, i have no errors.

@jcsbanks
Copy link

Me too.

@jcsbanks
Copy link

Adding SRCTREE environment variable as C:\msys32\home\jcsba\esp\esp-idf or various other paths doesn't help but does show in the error message that $srctree was defined rather than being unset as with the original error message.

@ulfalizer
Copy link

Maybe $COMPONENT_KCONFIGS_PROJBUILD is set to the MSYS2-internal *nix path, while Python expects the Windows path. This is the line the error points to:

source "$COMPONENT_KCONFIGS_PROJBUILD"

Kconfiglib itself doesn't do any special path processing. It's probably some kind of mismatch between the Python version being used and MSYS2.

@DMPatod
Copy link

DMPatod commented Dec 12, 2018

I've got this error too

@DMPatod
Copy link

DMPatod commented Dec 12, 2018

The master branch is broken right now. I've checkout on 964f5a9 commit, then the build returned to work

@kakaducsy
Copy link
Author

kakaducsy commented Dec 13, 2018

I try " https://github.com/espressif/esp-idf/releases" ESP-IDF Release v3.1.1 as @SMHRambo comment ,
and build ok, it only have 2 warnings
c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe:esp32.common.ld:39: warning: memory region 'rtc_data_seg' not declared c:/msys32/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe:esp32.common.ld:66: warning: memory region 'rtc_data_location' not declared

@Joo200
Copy link

Joo200 commented Dec 13, 2018

Same problem.
I would like to add the reference to #2722

@renzbagaporo
Copy link
Contributor

Hi all, @ulfalizer is correct. The kconfig paths are not passed to the linker script generator (ldgen.py) properly unlike when build is invoked from MSYS.

I've submitted a fix internally, the patch file is provided below for you to verify if it works.

0004-ldgen-fix-issue-when-not-built-in-msys2.patch.txt

@kakaducsy Although just warnings, those seem to be important ones. These might have been fixed by later commits, though. If you tried the patch on the latest master and those warnings still persist, I encourage you to file a separate issue for that.

@noyelseth
Copy link

noyelseth commented Sep 15, 2019

build failed on Ubuntu with this current IDF Version : v4.1-dev-256-g9f145ff

Generating esp32.project.ld
/home/noyelseth/esp/esp-idf/Kconfig:21: warning: Kconfiglib expands environment variables in strings directly, meaning you do not need 'option env=...' "bounce" symbols. For compatibility with the C tools, rename IDF_TARGET_ENV to IDF_TARGET (so that the symbol name matches the environment variable name).
Traceback (most recent call last):
File "/home/noyelseth/esp/esp-idf/tools/ldgen/ldgen.py", line 150, in
main()
File "/home/noyelseth/esp/esp-idf/tools/ldgen/ldgen.py", line 114, in main
sdkconfig = SDKConfig(kconfig_file, config_file)
File "/home/noyelseth/esp/esp-idf/tools/ldgen/sdkconfig.py", line 50, in init
self.config = kconfiglib.Kconfig(kconfig_file)
File "/usr/local/lib/python2.7/dist-packages/kconfiglib.py", line 1038, in init
self._parse_block(None, self.top_node, self.top_node)
File "/usr/local/lib/python2.7/dist-packages/kconfiglib.py", line 2875, in _parse_block
if self.srctree else "unset or blank"))
kconfiglib.KconfigError: /home/noyelseth/esp/esp-idf/Kconfig:67: '/home/noyelseth/esp/esp-idf/components/app_update/Kconfig.projbuild /home/noyelseth/esp/esp-idf/components/bootloader/Kconfig.projbuild /home/noyelseth/esp/esp-idf/components/esptool_py/Kconfig.projbuild /home/noyelseth/esp/esp-idf/components/partition_table/Kconfig.projbuild' not found (in 'source "$COMPONENT_KCONFIGS_PROJBUILD"'). Check that environment variables are set correctly (e.g. $srctree, which is set to '/home/noyelseth/esp/esp-idf'). Also note that unset environment variables expand to the empty string.
/home/noyelseth/esp/esp-idf/components/esp32/Makefile.projbuild:17: recipe for target '/home/noyelseth/esp/esp_workspace/hello_world/build/esp32/esp32.project.ld' failed
make: *** [/home/noyelseth/esp/esp_workspace/hello_world/build/esp32/esp32.project.ld] Error 1

image

please help on this.. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants