darsto / brother-scand

Network driver for Brother scanner devices. Daemon for press-to-scan functionality.
MIT License
7 stars 16 forks source link

Sources problem #5

Closed sebastianbasierski closed 6 years ago

sebastianbasierski commented 6 years ago

There is a problem with getting driver sources.

Here is a log i got while following installation guideline:

rumcajs@rumcajs-pc:/home/rumcajs/Projekty$ git clone https://github.com/darsto/brother-scanner-driver.git
Cloning into 'brother-scanner-driver'...
remote: Counting objects: 524, done.
remote: Total 524 (delta 0), reused 0 (delta 0), pack-reused 524
Receiving objects: 100% (524/524), 102.27 KiB | 0 bytes/s, done.
Resolving deltas: 100% (341/341), done.
rumcajs@rumcajs-pc:~/Projekty$ cd brother-scanner-driver
rumcajs@rumcajs-pc:~/Projekty/brother-scanner-driver(master)$ mkdir build
rumcajs@rumcajs-pc:~/Projekty/brother-scanner-driver(master)$ cd build
rumcajs@rumcajs-pc:~/Projekty/brother-scanner-driver/build(master)$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.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
CMake Error at CMakeLists.txt:25 (add_executable):
  Cannot find source file:

    ber/ber.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

CMake Error: CMake can not determine linker language for target: brother
CMake Error: Cannot determine link language for target "brother".
-- Generating done
-- Build files have been written to: /home/rumcajs/Projekty/brother-scanner-driver/build

I tried to clone ber with git submodule, but i got:

rumcajs@rumcajs-pc:/home/rumcajs/Projekty/brother-scanner-driver(master)$ git submodule init
Submodule 'ber' (git@github.com:darsto/ber.git) registered for path 'ber'
rumcajs@rumcajs-pc:~/Projekty/brother-scanner-driver(master)$ git submodule update
Cloning into '/home/rumcajs/Projekty/brother-scanner-driver/ber'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:darsto/ber.git' into submodule path '/home/rumcajs/Projekty/brother-scanner-driver/ber' failed
Failed to clone 'ber'. Retry scheduled
Cloning into '/home/rumcajs/Projekty/brother-scanner-driver/ber'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:darsto/ber.git' into submodule path '/home/rumcajs/Projekty/brother-scanner-driver/ber' failed
Failed to clone 'ber' a second time, aborting

However cloning ber as standalone project works:

rumcajs@rumcajs-pc:/home/rumcajs/Projekty$ git clone https://github.com/darsto/cber.git
Cloning into 'cber'...
remote: Counting objects: 205, done.
remote: Total 205 (delta 0), reused 0 (delta 0), pack-reused 205
Receiving objects: 100% (205/205), 40.91 KiB | 0 bytes/s, done.
Resolving deltas: 100% (126/126), done.
darsto commented 6 years ago

Hi, Thanks for the report! It's now fixed in the latest master. D.

aphirst commented 4 years ago

It seems this is still an issue here in master. I also tried building from @rumpeltux 's repo but seemed to get the same problem. Any update on this?

rumpeltux commented 4 years ago

Did you run:

git submodule init
git submodule update

(as indicated in the updated README in above’s commit)?

aphirst commented 4 years ago

I had neglected to do that, but still seem to get issues. Using @darsto 's version:

[alarm@alarm brother-scand]$ git submodule init && git submodule update
Submodule 'ber' (https://github.com/darsto/ber.git) registered for path 'ber'
Cloning into '/home/alarm/build/brother-scand/ber'...
Submodule path 'ber': checked out 'a047f4ee06185f99901cb2b0a07733e6874cdf10'
[alarm@alarm brother-scand]$ make
gcc -c -MM -MF build/main.d main.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/main.o main.c
gcc -c -MM -MF build/con_queue.d con_queue.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/con_queue.o con_queue.c
gcc -c -MM -MF build/log.d log.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/log.o log.c
gcc -c -MM -MF build/device_handler.d device_handler.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/device_handler.o device_handler.c
device_handler.c: In function ‘device_handler_add_device’:
device_handler.c:180:9: error: ‘dev’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         free(dev);
         ^~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:27: build/device_handler.o] Error 1

In a fresh folder with @rumpeltux 's version:

[alarm@alarm brother-scand]$ git submodule init && git submodule update
Submodule 'ber' (https://github.com/darsto/ber.git) registered for path 'ber'
Cloning into '/home/alarm/build/build2/brother-scand/ber'...
Submodule path 'ber': checked out 'a047f4ee06185f99901cb2b0a07733e6874cdf10'
[alarm@alarm brother-scand]$ make
gcc -c -MM -MF build/main.d main.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/main.o main.c
gcc -c -MM -MF build/con_queue.d con_queue.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/con_queue.o con_queue.c
gcc -c -MM -MF build/log.d log.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/log.o log.c
gcc -c -MM -MF build/device_handler.d device_handler.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/device_handler.o device_handler.c
gcc -c -MM -MF build/event_thread.d event_thread.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/event_thread.o event_thread.c
gcc -c -MM -MF build/config.d config.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/config.o config.c
gcc -c -MM -MF build/connection.d connection.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/connection.o connection.c
gcc -c -MM -MF build/data_channel.d data_channel.c
gcc -std=gnu11 -pedantic -Wall -Wextra -Werror -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Wformat=2 -Wswitch-default -Wno-unused-label -Wno-unused-function -Wcast-align -Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline -Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls -Wold-style-definition -c -o build/data_channel.o data_channel.c
data_channel.c: In function ‘exchange_params2’:
data_channel.c:562:43: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare]
     if (msg_len < 0 || (unsigned) msg_len != buf - data_channel->buf) {
                                           ^~
cc1: all warnings being treated as errors
make: *** [Makefile:27: build/data_channel.o] Error 1

So, either way, I'm still unable to build.

rumpeltux commented 4 years ago

I cannot really reproduce, but you can try make clean; make CFLAGS=