compilation failed on macosx
cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -bundle -multiply_defined suppress -o json_enhancements.so src/hstore_to_json.o src/json_extra.o src/jsonfuncs.o -L/usr/local/Cellar/postgresql/9.2.4/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib -Wl,-dead_strip_dylibs /usr/local/Cellar/postgresql/9.2.4/lib/hstore.so -bundle_loader /usr/local/Cellar/postgresql/9.2.4/bin/postgres
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [json_enhancements.so] Error 1
Comments (10)
-
-
reporter #! cp sql/json_enhancements.sql sql/json_enhancements--1.0.0.sql cp json_enhancements_with_hstore.control json_enhancements.control cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I/usr/local/Cellar/postgresql/9.2.4/include/server -I/usr/local/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o src/hstore_to_json.o src/hstore_to_json.c cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I/usr/local/Cellar/postgresql/9.2.4/include/server -I/usr/local/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o src/json_extra.o src/json_extra.c cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I/usr/local/Cellar/postgresql/9.2.4/include/server -I/usr/local/Cellar/postgresql/9.2.4/include/internal -I/usr/include/libxml2 -c -o src/jsonfuncs.o src/jsonfuncs.c cc -I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -bundle -multiply_defined suppress -o json_enhancements.so src/hstore_to_json.o src/json_extra.o src/jsonfuncs.o -L/usr/local/Cellar/postgresql/9.2.4/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/lib -Wl,-dead_strip_dylibs /usr/local/Cellar/postgresql/9.2.4/lib/hstore.so -bundle_loader /usr/local/Cellar/postgresql/9.2.4/bin/postgres ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [json_enhancements.so] Error 1
-
reporter It seems that problem is in linking with hstore.so. Disabling hstore extension temporary solves problem
-
I am facing the same issue. How do you disable hstore extension?
-
reporter i don't really know how to do this right, but i've placed NOHSTORE = 1 on top of makefile and it works
-
Thanks Ponimas That works for me too.. Looks like that will break hstore based functions.. Thats probably one penalty to pay
-
If there is someone around, I still have an issue with that.
So when trying to compile (under OSX Mavericks), I had the same issue listed here at compilation, so I've added
NOHSTORE = 1
in the makefile and the compilation works as well as the install.
However when I try to create the extension in psql I still get a problem. If I don't create the hstore extension it tells me hstore is required
CREATE EXTENSION json_enhancements; ERROR: required extension "hstore" is not installed
If I create hstore, then there is another error
CREATE EXTENSION hstore; Query returned successfully with no result in 103 ms. CREATE EXTENSION json_enhancements; ERROR: could not find function "hstore_to_json" in file "/usr/local/Cellar/postgresql92/9.2.8_1/lib/json_enhancements.so"
So... damn if you do, damn if you don't. if @gembatech or @ponimas have any idea?
-
It looks like you didn't do "make clean" before you rebuild with NOHSTORE defined. You would need to do that is you had previously built without defining it.
-
That's it!
Thank you for your super work @adunstan, this extension will really make my life much easier.
-
- changed status to resolved
- Log in to comment
I would need to see the whole Make invocation. There is also nothing I can really do about this since I don't have an OSX test system.