nikosft / libcoap

Examples that use the libCoAP library
24 stars 11 forks source link

make: *** No targets specified and no makefile found. #5

Closed dpapdpap closed 4 years ago

dpapdpap commented 4 years ago

Hi, I did the instructions exactly but I can't proccede because "make" throws the error on the issue's title. I did and I received the follwing : `user@ubuntu:-$ git clone https://github.com/obgm/libcoap.git Cloning into 'libcoap'... remote: Enumerating objects: 68, done. remote: Counting objects: 100% (68/68), done. remote: Compressing objects: 100% (55/55), done. remote: Total 9447 (delta 25), reused 35 (delta 8), pack-reused 9379 Receiving objects: 100% (9447/9447), 3.82 MiB | 1014.00 KiB/s, done. Resolving deltas: 100% (6657/6657), done. Checking connectivity... done. user@ubuntu:-$ cd libcoap user@ubuntu:-/libcoap$ ./autogen.sh

[HINT] You can run 'autogen.sh --clean' to remove all generated files by the autotools.

Found 'autoconf'. Found 'aclocal'. Found 'pkg-config'.

Couldn't find 'libtool'! Found 'libtoolize'.

---> Found all needed tools! That's fine.

Generating needed autotools files for libcoap by running autoreconf ... autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force ${ACLOCAL_FLAGS} -I m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: adding subdirectory ext/tinydtls to autoreconf autoreconf: Entering directory ext/tinydtls' autoreconf: configure.ac: not using Autoconf autoreconf: Leaving directory ext/tinydtls' autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt-obsolete.m4' autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:38: installing './ar-lib' configure.ac:33: installing './compile' configure.ac:43: installing './config.guess' configure.ac:43: installing './config.sub' configure.ac:23: installing './install-sh' configure.ac:23: installing './missing' Makefile.am: installing './INSTALL' Makefile.am: installing './depcomp' autoreconf: Leaving directory .'

You can now run 'configure --help' to see possible configuration options. Otherwise process the configure script to create the makefiles and generated helper files.

user@ubuntu:-/libcoap$ ./configure --disable-documentation checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.20... yes checking whether make supports nested variables... (cached) yes checking whether to enable assertions... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for a sed that does not truncate output... /bin/sed checking for ar... ar checking the archiver (ar) interface... ar checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether byte ordering is bigendian... no checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... (cached) /bin/sed checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for archiver @file support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /bin/dd checking how to truncate binary pipes... /bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking whether C compiler accepts -Wlogical-op... yes checking whether C compiler accepts -fdiagnostics-color... yes checking whether C compiler accepts -Wunused-result... yes checking whether the linker accepts -Wl,--version-script=./libcoap-2.map... yes checking for GnuTLS... no checking for OpenSSL... no checking for mbedtls_ssl_handshake in -lmbedtls... no configure: error: ==> Option '--enable-dtls' is set but none of the needed cryptography libraries GnuTLS, OpenSSL or mbed TLS could be found! Install at least one of the package(s) that contains the development files for GnuTLS (>= 3.3.0), OpenSSL(>= 1.1.0), or mbed TLS(>= 2.7.10) or disable the DTLS support using '--disable-dtls'. user@ubuntu:-/libcoap$ export LD_LIBRARY_PATH=/usr/local/lib user@ubuntu:-/libcoap$ echo $LD_LIBRARY_PATH /usr/local/lib user@ubuntu:-/libcoap$ make make: No targets specified and no makefile found. Stop.

What i'm missing, please ?

PS. sorry, I can't format the message better

nikosft commented 4 years ago

The problem is that you don't have libtool installed. (You can see that when you run autogen.sh it outputs Couldn't find 'libtool'!. You can fix that by running sudo apt install libtool-bin

dpapdpap commented 4 years ago

Many thanks Niko for your reply.

I was misled by the indication "---> Found all needed tools! That's fine." I loaded the libtools as you suggested but again the make out "no targets determined and no makefile found".

nikosft commented 4 years ago

Can you try run autogen.sh --clean first and then repeat the procedure?

dpapdpap commented 4 years ago

Niko, thanks again. No luck again. I removed folder libcoap and I installed again (with libtools installed) but same error. In folder libcoap I see three files : Makefile.am, Makefile.in, Makefile.libcoap. I notice that in the config.log file it states an error in the confdefs.h file

configure: 4566: gcc -E conftest.cconftest.c: 9:28: fatal error: ac_nonexistent.h: No such file or directory terminated compilation. configure: 4566: $? = 1 configure: failed program was: | / confdefs.h / | #define PACKAGE_NAME "libcoap" | #define PACKAGE_TARNAME "libcoap" | #define PACKAGE_VERSION "4.3.0beta" | #define PACKAGE_STRING "libcoap 4.3.0beta" | #define PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net" | #define PACKAGE_URL "https://libcoap.net/" | / end confdefs.h. /

dpapdpap commented 4 years ago

https://github.com/nikosft/libcoap/issues/5

From: Nikos Fotiou notifications@github.com Sent: Thursday, May 7, 2020 1:16 AM To: nikosft/libcoap libcoap@noreply.github.com Cc: dpapdpap dpapdpap@gmail.com; Author author@noreply.github.com Subject: Re: [nikosft/libcoap] make: *** No targets specified and no makefile found. (#5)

Can you try run autogen.sh --clean first and then repeat the procedure?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nikosft/libcoap/issues/5#issuecomment-624919788 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOUQ2HWX5FAQB5FF56WMK6TRQHORRANCNFSM4MZQS35A .

-- This email has been checked for viruses by AVG. https://www.avg.com

nikosft commented 4 years ago

This error is intentional and should be there. Can you try to execute configure as follows

./configure --disable-documentation --disable-dtls

dpapdpap commented 4 years ago

Great Nikos! This --disable-dtls was to blame! Now both make and make install have been executed (they need sudo though) and then I will try your example. Thanks again

PS I hope you don't misunderstand me if I need your help again!

Brumawen commented 3 years ago

Just for the record, if you need to have DTLS support then you need to install the following packages: sudo apt install libtool sudo apt install libtool-bin sudo apt install libssl-dev

ayushgupta9198 commented 3 years ago

Hi all ,

This issue was solved by me you can find the solution in my profile

Thanks for your time