GithubHelp home page GithubHelp logo

Comments (5)

wez avatar wez commented on April 16, 2024

Sounds like a dependency problem. Are you running make -j?

from watchman.

dsummersl avatar dsummersl commented on April 16, 2024

No, I'm just using make (no -j).

First time around, I see:

...
...
mv -f thirdparty/jansson/.deps/libwmanjson_a-utf.Tpo thirdparty/jansson/.deps/libwmanjson_a-utf.Po
cc -DHAVE_CONFIG_H -I.  -Ithirdparty/jansson -D_REENTRANT  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer -MT thirdparty/libtap_a-tap.o -MD -MP -MF thirdparty/.deps/libtap_a-tap.Tpo -c -o thirdparty/libtap_a-tap.o `test -f 'thirdparty/tap.c' || echo './'`thirdparty/tap.c
mv -f thirdparty/.deps/libtap_a-tap.Tpo thirdparty/.deps/libtap_a-tap.Po
mv -f thirdparty/jansson/.deps/libwmanjson_a-value.Tpo thirdparty/jansson/.deps/libwmanjson_a-value.Po
...
...
cc  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer   -o tests/log.t tests/tests_log_t-log.o tests_log_t-log.o -L. -lwmanjson -ltap -L/usr/local/Cellar/pcre/8.33/lib -lpcre
ld: library not found for -lwmanjson
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [tests/log.t] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f tests/.deps/tests_argv_t-argv.Tpo tests/.deps/tests_argv_t-argv.Po
make: *** [all] Error 2

(which fails at the line I mentioned earlier).

Second time around I see:

rm -f libwmanjson.a
ar cru libwmanjson.a thirdparty/jansson/libwmanjson_a-dump.o thirdparty/jansson/libwmanjson_a-error.o thirdparty/jansson/libwmanjson_a-hashtable.o thirdparty/jansson/libwmanjson_a-load.o thirdparty/jansson/libwmanjson_a-memory.o thirdparty/jansson/libwmanjson_a-pack_unpack.o thirdparty/jansson/libwmanjson_a-strbuffer.o thirdparty/jansson/libwmanjson_a-strconv.o thirdparty/jansson/libwmanjson_a-utf.o thirdparty/jansson/libwmanjson_a-value.o 
rm -f libtap.a
ar cru libtap.a thirdparty/libtap_a-tap.o 
ranlib libwmanjson.a
ranlib libtap.a
cc  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer   -o watchman watchman-argv.o watchman-opt.o watchman-cfg.o watchman-log.o watchman-json.o watchman-bser.o watchman-hash.o watchman-ht.o cmds/watchman-find.o cmds/watchman-info.o cmds/watchman-log.o cmds/watchman-query.o cmds/watchman-since.o cmds/watchman-subscribe.o cmds/watchman-trigger.o cmds/watchman-watch.o query/watchman-base.o query/watchman-parse.o query/watchman-init.o query/watchman-eval.o query/watchman-type.o query/watchman-suffix.o query/watchman-match.o query/watchman-pcre.o query/watchman-name.o query/watchman-fieldlist.o query/watchman-since.o query/watchman-empty.o watchman-listener.o watchman-clientmode.o watchman-main.o watchman-root.o watchman-rules.o watchman-state.o watchman-string.o -L. -lwmanjson -L/usr/local/Cellar/pcre/8.33/lib -lpcre
cc  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer   -o tests/argv.t tests/tests_argv_t-argv.o tests_argv_t-argv.o -L. -lwmanjson -ltap -L/usr/local/Cellar/pcre/8.33/lib -lpcre
cc  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer   -o tests/log.t tests/tests_log_t-log.o tests_log_t-log.o -L. -lwmanjson -ltap -L/usr/local/Cellar/pcre/8.33/lib -lpcre
cc  -m64 -I/usr/local/Cellar/pcre/8.33/include -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer   -o tests/bser.t tests/tests_bser_t-bser.o tests_bser_t-bser.o -L. -lwmanjson -ltap -L/usr/local/Cellar/pcre/8.33/lib -lpcre

It looks like the wmanjson library isn't compiled into an archive the first time
around.

from watchman.

wez avatar wez commented on April 16, 2024

Try with this diff:

diff --git a/Makefile.am b/Makefile.am
index aa481f8..d632fa5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ doc_DATA = README.markdown
 docdir = ${prefix}/share/doc/watchman-$(VERSION)

 THIRDPARTY_CPPFLAGS = -I$(top_srcdir)/thirdparty/jansson -I$(top_builddir)/thirdparty/jansson
-JSON_LIB = -L. -lwmanjson
+JSON_LIB = -L. libwmanjson.a

 watchman_CPPFLAGS = $(THIRDPARTY_CPPFLAGS) @IRONMANCFLAGS@
 watchman_LDADD = $(JSON_LIB)
@@ -72,7 +72,7 @@ libwmanjson_a_SOURCES = \
 # bundled testing library
 libtap_a_CPPFLAGS = $(THIRDPARTY_CPPFLAGS)
 libtap_a_SOURCES = thirdparty/tap.c
-TAP_LIB = -ltap
+TAP_LIB = libtap.a

 # unit tests
 TESTS = tests/argv.t tests/log.t tests/bser.t

from watchman.

dsummersl avatar dsummersl commented on April 16, 2024

A slight mod to the patch (for v2.5.1 that I'm using) works fine, thanks! BTW I'm submitting a push for homebrew and I'll include this patch with it for v2.5.1 (Homebrew/legacy-homebrew#20349). Will this patch be included for future releases?

from watchman.

wez avatar wez commented on April 16, 2024

Yep, pushed d335591 and tagged it as 2.6; you can update your recipe to point to that; thanks for reporting this, and thanks for getting it into homebrew.

from watchman.

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.