Error when compiling using arduino-builder on mac os x - macos

Arduino version: 1.8.2
Max OS X version: 10.12.3
arduino-builder -compile -hardware /Applications/Arduino.app/Contents/Java/hardware -tools /Applications/Arduino.app/Contents/Java/tools -fqbn arduino:avr:uno -verbose SimpleTimer.ino
Error:
fork/exec /bin/avr-g++: no such file or directory

I had to put in a couple fixes before the above command worked.
In file
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/platform.txt
change this property:
compiler.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/
In file /Applications/Arduino.app//Contents/Java/hardware/platform.txt
change this property:
tools.ctags.path=/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11
Credit:
https://github.com/Sloeber/arduino-eclipse-plugin/issues/236

Marcello's answer worked for me, but I would propose a more convenient solution in the form of a wrapper-script to do all the dirty work:
#!/usr/bin/env bash
arduino-builder \
-compile \
-hardware /Applications/Arduino.app/Contents/Java/hardware \
-tools /Applications/Arduino.app/Contents/Java/tools \
-fqbn arduino:avr:uno \
-libraries ../libraries/ \
-prefs=compiler.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/ \
-prefs=tools.ctags.path=/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11 \
-verbose \
SimpleTimer.ino

Related

openapi-generator: command not found for bash script

I have a generate.sh file with below lines of code,
#!/bin/bash
openapi-generator generate -g aspnetcore \
--template-dir ${PWD}/openapi-generator-aspnetcore3-templates/ \
--additional-properties aspnetCoreVersion=3.1 \
--additional-properties classModifier=abstract \
--additional-properties operationModifier=abstract \
--additional-properties packageName=RedHat.TodoList \
--additional-properties packageTitle=TodoList \
-i todo_openapi.yaml \
-o ${PWD}
When I am trying to run it Git Bash tool it's throwing error ./generate.sh: line 3: openapi-generator: command not found, I can see openapi-generator-cli commands working fine.
In generate.sh, replace openapi-generator with openapi-generator-cli instead.
(openapi-generator is usually installed via brew on Mac)
Looks like PATH problem.
Use which openapi-generator in terminal or Git Bash, whichever works for you, to find openapi-generator path first.
$ which openapi-generator
/usr/local/bin/openapi-generator
Then add the path to PATH variable in your generate.sh, e.g. put the following line before you call openapi-generator.
PATH+=:/usr/local/bin

Invalid argument from bash script on MacOS command line

I'm trying to run the LiteCart bash installer script located here:
https://github.com/litecart/installer/tree/master/cli
Unfortunately, it's giving me a problem when I add preset arguments like this:
--document_root=/var/www/litecart/public_html \
--db_server=localhost \
--db_user=johndoe \
--db_password=mycatsname \
--db_database=mylitecartdb \
--db_prefix=lc_ \
--timezone=Europe/London \
--admin_folder=admin \
--admin_user=admin \
--admin_password=mydogsname \
--development_type=standard
I keep getting:
Error: Invalid argument (--document_root=/var/www/litecart/public_html)
My computer is running MacOS 10.15 and the server is running CentOS 7.9. The script runs fine without the arguments.
I can't find anything that even resembles this situation here. What's the proper way to run a script like this? Thanks.
Script contains no case for --document_root.
Try:
export document_root="/var/www/litecart/public_html"
./install.sh --db_server=localhost \
--db_user=johndoe \
--db_password=mycatsname \
--db_database=mylitecartdb \
--db_prefix=lc_
I assume that there are more problems in the script.

What does that script mean? What do i have to do to run it?

So, i have to update a firmware of a sonoff switch with a script i found on GitHub, i don't know how and where to run it, what programmes do i need. (I'm on windows)
I installed bash and tried to run it but it says "No such file or directory" and none of the tutorials on the internet works.
it says "line 8: esptool.py command not found"
esptool.py \
-p $SONOFF_PORT \
--baud 115200 \
write_flash \
-fs 8m \
-fm dout \
-ff 40m \
0x0 ./firmware/rboot.bin \
0x1000 ./firmware/blank_config.bin \
0x2000 ./firmware/Sonoff_$POWERON_STATE.bin
it should work and start the script but i keep getting error messages.
To install esptool using pip pip install esptool.
To check if you have python or pip installed:
python -V
pip -V
According to the filename (esptool.py) this should be a python script. So you need to have the correct python version (python2 or python3) installed and then run it via the respective python interpreter.
python esptool.py ...
Just executing it via bash tries to interpret as a bash script and that explains the error you are getting.

Jazzy 0.7.0 XCode 7.3.1 --exclude is not working

Just wondering if anyone has found a work around for this. Using --exclude using a full file path to a swift file and Jazzy still includes this file / class in the documentation. Shell file looks like this
jazzy \
--clean \
--author "Author" \
--copyright "Copyright" \
--xcodebuild-arguments '-project,jazzytest.xcodeproj,-scheme,jazzytest' \
--exclude /Users/<username-here>/desktop/jazzytest/jazzytest/source/swift1.swift \
--min-acl public

rpm can't find configure no such file

I have a problem with my spec file. When I run it with rpmbuild it says it can't find ./configure no such file or directory. Here is a part of the code of my spec file. Can someone help me?
...
BuildRequires: gd-devel > 1.8, mailx, libjpeg-devel, libpng-devel
Requires: httpd php53 gcc
%description
Nagios is a program that will monitor hosts and services on your
network.
%package common
Group: Applications/System
Summary: Provides common directories, uid and gid among nagios-related packages
Requires(pre): shadow-utils
Requires(post): shadow-utils
Provides: user(nagios)
Provides: group(nagios)
%description common
Provides common directories, uid and gid among nagios-related packages.
%prep
%setup -q -n %{name}-%{version}
%build
%configure \
--prefix=%{_datadir}/%{name} \
--exec-prefix=%{_localstatedir}/lib/%{name} \
--with-init-dir=%{_initrddir} \
--with-cgiurl=/%{name}/cgi-bin/ \
--with-htmlurl=/%{name} \
--with-lockfile=%{_localstatedir}/run/%{name}.pid \
--libdir=%{_libdir}/%{name} \
--with-nagios-user=nagios \
--with-nagios-grp=nagios \
--bindir=%{_sbindir} \
--libexecdir=%{_libdir}/%{name}/plugins \
--sysconfdir=%{_sysconfdir}/%{name} \
--localstatedir=%{_localstatedir}/log/%{name} \
--datadir=%{_datadir}/%{name}/html \
--with-gd-lib=%{_libdir} \
--with-gd-inc=%{_includedir} \
--enable-embedded-perl \
--with-perlcache \
...
I am not familiar with nagios, but have you confirmed that when you extract the distribution tarball, there is a configure file in the top-level directory? If not, you need to add the steps to get there.

Resources