Giter Site home page Giter Site logo

[Windows] Build fails about ino HOT 12 OPEN

amperka avatar amperka commented on July 18, 2024
[Windows] Build fails

from ino.

Comments (12)

nkrkv avatar nkrkv commented on July 18, 2024

Are you in a directory that was filled with project skeleton after ino init? In other words: do you actually have src subdir in current directory?

from ino.

iarspider avatar iarspider commented on July 18, 2024

Ah, I must have missed the quickstart part.

from ino.

iarspider avatar iarspider commented on July 18, 2024

`

python d:\uno init -t Blink

python d:\uno build -d d:\Work\arduino-1.0

Searching for Board description file (boards.txt) ... ←[92md:\Work\arduino-1.0\hardware\arduino\boards.txt←[0m
Searching for Arduino lib version file (version.txt) ... ←[92md:\Work\arduino-1.0\lib\version.txt←[0m
Detecting Arduino software version ... ←[92m1.0 (1.0)←[0m
Searching for Arduino core library ... ←[92md:\Work\arduino-1.0\hardware\arduino\cores\arduino←[0m
Searching for Arduino standard libraries ... ←[92md:\Work\arduino-1.0\libraries←[0m
Searching for Arduino variants directory ... ←[92md:\Work\arduino-1.0\hardware\arduino\variants←[0m
Searching for avr-gcc ... ←[92md:\Work\arduino-1.0\hardware\tools\avr\bin\avr-gcc←[0m
Searching for avr-g++ ... ←[92md:\Work\arduino-1.0\hardware\tools\avr\bin\avr-g++←[0m
Searching for avr-ar ... ←[92md:\Work\arduino-1.0\hardware\tools\avr\bin\avr-ar←[0m
Searching for avr-objcopy ... ←[92md:\Work\arduino-1.0\hardware\tools\avr\bin\avr-objcopy←[0m
Traceback (most recent call last):
File "D:\run.py", line 6, in
main()
File "C:\Python27\lib\site-packages\ino-0.3.3-py2.7.egg\ino\runner.py", line 6
3, in main
args.func(args)
File "C:\Python27\lib\site-packages\ino-0.3.3-py2.7.egg\ino\commands\build.py"
, line 189, in run
self.make('Makefile.sketch')
File "C:\Python27\lib\site-packages\ino-0.3.3-py2.7.egg\ino\commands\build.py"
, line 139, in make
ret = subprocess.call(['make', '-f', makefile, 'all'])
File "C:\Python27\lib\subprocess.py", line 493, in call
return Popen(_popenargs, *_kwargs).wait()
File "C:\Python27\lib\subprocess.py", line 679, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
`

from ino.

iarspider avatar iarspider commented on July 18, 2024

I guess it doesn't find make.exe (part of Arduino IDE/avr-gcc)

from ino.

nkrkv avatar nkrkv commented on July 18, 2024

Yes, it's a continue of issue #25. make is not found. To continue the battle you could replace

ret = subprocess.call(['make', '-f', makefile, 'all'])

with something like

ret = subprocess.call(['d:\full\path\to\make.exe', '-f', makefile, 'all'])

from ino.

iarspider avatar iarspider commented on July 18, 2024

Well, that is even uglier than in issue 25. The best way to handle this would be to alter %PATH% variable before calling make - this will help make find the rest of the tools.

from ino.

nkrkv avatar nkrkv commented on July 18, 2024

I'm not consider to include these hacks as is. I suggest just to find all corner stones on Windows so that they could be carefully worked around eventually.

from ino.

iarspider avatar iarspider commented on July 18, 2024

Another bump in the road: windows doesn't need '-p' in mkdir to create parent dirs automaticaly (with 'command extenstions' enabled - i.e. WinXP or newer, maybe Win2000), and echo doesn't need '-n'. And Windows have no built-in 'cat' (but arduino has it)

from ino.

iarspider avatar iarspider commented on July 18, 2024

Linking firmware.elf d:\Work\arduino-1.0\hardware\tools\avr\bin\avr-gcc.exe -Os -Wl,--gc-sections -mmcu=atmega328p -o .build\firmware.elf .build\src\sketch.o -lmd:/work/arduino-1.0/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference to``main' make: *** [.build\firmware.elf] Error 1 Make failed with code 2
For some reason, main.cpp et al are not added as dependencies under Windows.

from ino.

iarspider avatar iarspider commented on July 18, 2024

Found the source of the problem. I will now cleanup my hacks and make a pull request.

from ino.

amoose136 avatar amoose136 commented on July 18, 2024

Linking firmware.elf d:\Work\arduino-1.0\hardware\tools\avr\bin\avr-gcc.exe -Os -Wl,--gc-sections -mmcu=atmega328p -o .build\firmware.elf .build\src\sketch.o -lmd:/work/arduino-1.0/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5/crtm328p.o:(.init9+0x0): undefined reference tomain' make: *** [.build\firmware.elf] Error 1 Make failed with code 2 ``
For some reason, main.cpp et al are not added as dependencies under Windows.

This is currently where my build of ino gets to.

Found the source of the problem. I will now cleanup my hacks and make a pull request.

Were you ever able to solve the main.cpp issue? I looked through the 4 commits you made on your fork and I couldn't see any changes that seemed relevant to that issue.

from ino.

amoose136 avatar amoose136 commented on July 18, 2024

Specifically I am running an install on python3 with MSYS2 and I get this:

blink ❯ ino build -v -m uno
*** RUN .build_msys/uno/Makefile.sketch ...
*** RUN .build_msys/uno/Makefile.deps ...
*** RUN .build_msys/uno/Makefile ...
Linking firmware.elf
../../../../Progra~2/Arduino/hardware/tools/avr/bin/avr-gcc -mmcu=atmega328p -Wl,-Os -Wl,--gc-sections -o .build_msys/uno/firmware.elf .build_msys/uno/src/sketch.o -lm
c:/progra~2/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
make: *** [.build_msys/uno/Makefile:42: .build_msys/uno/firmware.elf] Error 1
Make failed with code 2

from ino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.