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

lmdb: fix build on OSX #10499

Merged
merged 1 commit into from
Oct 28, 2015
Merged

lmdb: fix build on OSX #10499

merged 1 commit into from
Oct 28, 2015

Conversation

jb55
Copy link
Contributor

@jb55 jb55 commented Oct 20, 2015

Fixes:

gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized   -c mdb.c
/nix/store/av9ybf7c0dr2mscxs5ccp8506ckvnj3l-bash-4.3-p42/bin/bash: gcc: command not found

I'm not too familar with nix on osx but I guess gcc isn't symlinked to clang in builds for some reason? Seems weird that I have to do this.

@vcunat vcunat added the 6.topic: darwin Running or building packages on Darwin label Oct 20, 2015
@davidak
Copy link
Member

davidak commented Oct 22, 2015

$ nox-review pr 10499
[...]
building path(s) ‘/nix/store/8v8ky4lmjql7n4z8mx32a60ghr2jh4df-pijul-0.1’
unpacking sources
unpacking source archive /nix/store/786mdm2lgjnjv0yjj6x7zhx0v1y752h8-fetchdarcs
source root is fetchdarcs
patching sources
configuring
no configure script, doing nothing
building
make flags: SHELL=/nix/store/av9ybf7c0dr2mscxs5ccp8506ckvnj3l-bash-4.3-p42/bin/bash
bash make_stubs
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
make_stubs: line 15: gcc: command not found
make_stubs: line 16: /tmp/pijul_build/tmp: No such file or directory
cc -fPIC -Wall -c -o lmdb_stubs.o lmdb_stubs.c
lmdb_stubs.c:40:3: warning: incompatible pointer to integer conversion initializing 'value' (aka 'long') with an expression of type 'MDB_env *' (aka 'struct MDB_env *') [-Wint-conversion]
  CAMLreturn(env);
  ^~~~~~~~~~~~~~~
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:227:28: note: expanded from macro 'CAMLreturn'
#define CAMLreturn(result) CAMLreturnT(value, result)
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:222:8: note: expanded from macro 'CAMLreturnT'
  type caml__temp_result = (result); \
       ^                   ~~~~~~~~
lmdb_stubs.c:47:3: error: non-void function 'caml_mdb_env_copy' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:78:3: warning: incompatible pointer to integer conversion initializing 'value' (aka 'long') with an expression of type 'MDB_txn *' (aka 'struct MDB_txn *') [-Wint-conversion]
  CAMLreturn(txn);
  ^~~~~~~~~~~~~~~
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:227:28: note: expanded from macro 'CAMLreturn'
#define CAMLreturn(result) CAMLreturnT(value, result)
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:222:8: note: expanded from macro 'CAMLreturnT'
  type caml__temp_result = (result); \
       ^                   ~~~~~~~~
lmdb_stubs.c:84:3: error: non-void function 'caml_mdb_txn_abort' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:91:3: error: non-void function 'caml_mdb_txn_commit' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:125:3: error: non-void function 'caml_mdb_put' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:173:3: error: non-void function 'caml_mdb_del' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:181:3: error: non-void function 'caml_mdb_dbi_close' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:188:3: error: non-void function 'caml_mdb_drop' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:193:3: error: non-void function 'caml_mdb_env_close' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:208:3: error: non-void function 'caml_mdb_env_set_maxdbs' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:225:3: error: non-void function 'caml_mdb_cursor_renew' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:230:3: error: non-void function 'caml_mdb_cursor_close' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:266:3: error: non-void function 'caml_mdb_cursor_del' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
lmdb_stubs.c:279:3: error: non-void function 'caml_mdb_cursor_put' should return a value [-Wreturn-type]
  CAMLreturn0;
  ^
/nix/store/k8f89nm9l4jh4zqpwaiqjfc3gffmb1m0-ocaml-4.01.0/include/caml/memory.h:218:3: note: expanded from macro 'CAMLreturn0'
  return; \
  ^
2 warnings and 13 errors generated.
Makefile:32: recipe for target 'lmdb_stubs.o' failed
make: *** [lmdb_stubs.o] Error 1
builder for ‘/nix/store/m4m3park0vpki37n3xd409533a3p80ga-pijul-0.1.drv’ failed with exit code 2
error: build of ‘/nix/store/m4m3park0vpki37n3xd409533a3p80ga-pijul-0.1.drv’ failed
The invocation of "nix-build -A lmdb -A pijul /Users/davidak/.nox/nixpkgs" failed

@jb55
Copy link
Contributor Author

jb55 commented Oct 22, 2015

@davidak ? that's a pijul build issue, not lmdb. It looks like it has the same issue as lmdb where it tries to use gcc instead of clang

@jb55
Copy link
Contributor Author

jb55 commented Oct 22, 2015

Once this fix is pushed, we would need to apply the same fix for pijul and then it should work on osx.

@davidak
Copy link
Member

davidak commented Oct 22, 2015

yes, and pijul seams to be a dependency, so lmdb can not be used.
can you apply that patch also for pijul? i can again test it.

@jb55
Copy link
Contributor Author

jb55 commented Oct 22, 2015

This is just a fix for lmdb. If someone wants to fix pijul for osx they can do so, but it's not related to this PR.

@jb55
Copy link
Contributor Author

jb55 commented Oct 27, 2015

This is good to go whoever can merge

vbgl added a commit that referenced this pull request Oct 28, 2015
@vbgl vbgl merged commit 0ad5dc1 into NixOS:master Oct 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants