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

cmake error #8

Closed
dansass opened this issue Oct 4, 2020 · 9 comments
Closed

cmake error #8

dansass opened this issue Oct 4, 2020 · 9 comments

Comments

@dansass
Copy link

dansass commented Oct 4, 2020

when i wnat to run cmake .. && make it says

CMake Error: The source directory "/home/pi" does not appear to contain CMakeLists.txt.

and i am in the skymax-demo directory

whats going on?

@manio
Copy link
Owner

manio commented Oct 4, 2020

You are not in skymax-demo directory :)

@dansass
Copy link
Author

dansass commented Oct 5, 2020

I think I am

Screenshot_20201005-072516_Mobile SSH

@manio
Copy link
Owner

manio commented Oct 7, 2020

you're right
just type cmake (without ..) and see if it helps

@dansass
Copy link
Author

dansass commented Oct 7, 2020

Still no luck :(
here are my commands that i ran

11

22

33

@manio
Copy link
Owner

manio commented Oct 9, 2020

what if you do:

clone [...]
cd skymax-demo
mkdir build
cd build
cmake ..
make

@dansass
Copy link
Author

dansass commented Oct 9, 2020

44

for kicks i tried;

55

Im wondering if i Maybe installed cmake wrong. It sure is acting weird

@manio
Copy link
Owner

manio commented Oct 9, 2020

Yeah, you probably have something wrong.
Try to clone to some other dir then your home dir, like /tmp
For me it is working no matter if i do "cmake . " in main dir, or "cmake .." in build subdir:

/tmp/skymax-demo/build/ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/skymax-demo/build

@Edgepath
Copy link

Edgepath commented Mar 21, 2023

Hello,

thanks for the awesome software work 👯‍♀️

please update build instructions: like this:

# -1) tested on 
hostnamectrl; # Debian GNU/Linux 11 (bullseye)

# 0) have cmake installed
apt update; apt install cmake;

# 0.1) version installed
cmake --version
cmake version 3.18.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).

# 1) use https instead of ssh
git clone https://github.com/manio/skymax-demo.git

# 2) go into newly created subdir
cd skymax-demo

# 3) prepare build
cmake .

# output ought to be:

-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/path/where/src/is/skymax-demo

# 4) build
make

Scanning dependencies of target inverter_poller
[ 20%] Building CXX object CMakeFiles/inverter_poller.dir/inputparser.cpp.o
[ 40%] Building CXX object CMakeFiles/inverter_poller.dir/inverter.cpp.o
/home/user/path/where/src/is/skymax-demo/inverter.cpp: In member function ‘bool cInverter::query(const char*, int)’:
/home/user/path/where/src/is/skymax-demo/inverter.cpp:114:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
  114 |         n = read(fd, (void*)buf+i, replysize-i);
      |                      ~~~~~~~~~~^~
[ 60%] Building CXX object CMakeFiles/inverter_poller.dir/main.cpp.o
[ 80%] Building CXX object CMakeFiles/inverter_poller.dir/tools.cpp.o
[100%] Linking CXX executable inverter_poller
[100%] Built target inverter_poller


# 5) run the binary program
./inverter_poller -h

USAGE:  ./inverter_poller <args> [-r <command>], [-h | --help], [-1 | --run-once]

SUPPORTED ARGUMENTS:
          -r <raw-command>      TX 'raw' command to the inverter
          -h | --help           This Help Message
          -1 | --run-once       Runs one iteration on the inverter, and then exits
          -d                    Additional debugging

RAW COMMAND EXAMPLES (see protocol manual for complete list):
Set output source priority  POP00     (Utility first)
                            POP01     (Solar first)
                            POP02     (SBU)
Set charger priority        PCP00     (Utility first)
                            PCP01     (Solar first)
                            PCP02     (Solar and utility)
                            PCP03     (Solar only)
Set other commands          PEa / PDa (Enable/disable buzzer)
                            PEb / PDb (Enable/disable overload bypass)
                            PEj / PDj (Enable/disable power saving)
                            PEu / PDu (Enable/disable overload restart)
                            PEx / PDx (Enable/disable backlight)


@manio
Copy link
Owner

manio commented Mar 24, 2023

This is already covered in #17
Closing this three-years old issue.

@manio manio closed this as completed Mar 24, 2023
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

3 participants