Comments (11)
I am using GNU Make 3.81 on Mac OS X 10.7.4.
from mruby.
I am not sure but "comparison is always true" warning may prevent mrblib compilation.
I removed the warning in a3a9d13, please see if it works.
from mruby.
Thank you for removing the warning.
I updated the log: https://gist.github.com/2700367
from mruby.
I cannot reproduce the problem on the Linux box. I have no idea why make ignores creating mrblib.o and archiving it on your platform. Hmm.
from mruby.
Thank you very much for trying to reproduce this problem.
As the makeshift patch, I added .PHONY: $(LIBR) to mrblib/Makefile.
It works fine for me. But it always remakes libmruby.a.
from mruby.
I can reproduce it here too. Since the mrblib/Makefile changed (10 hour ago) it also doesn't build correctly anymore:
gcc -o ../../bin/mruby -g -O3 ../../src/../tools/mruby/mruby.o ../../lib/libmruby.a -lm
Undefined symbols for architecture x86_64:
"_mrb_init_mrblib", referenced from:
_mrb_init_core in libmruby.a(init.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../bin/mruby] Error 1
make: *** [all] Error 2
As iwado this is fixing it for me too:
diff --git a/mrblib/Makefile b/mrblib/Makefile
index 7129623..12ee23d 100644
--- a/mrblib/Makefile
+++ b/mrblib/Makefile
@@ -45,6 +45,8 @@ endif
.PHONY : all
all : $(LIBR)
+.PHONY : $(LIBR)
+
# update libmruby.a
$(LIBR) : $(MLIB)
$(AR) r $(LIBR) $(MLIB)
from mruby.
I don't want phony that forces libmruby.a to be updated.
What I don't understand is the reason why "make mrblib" don't update libmruby.a.
Top-level make run "make src" then "make mrblib", so the timestamp of mrblib.o should be newer than libmruby.a. Is anyone able to guess the situation?
from mruby.
GNU make on Mac OS X uses low resolution timestamp, maybe.
http://www.doof.me.uk/2012/04/21/portable-high-resolution-timestamps-from-stat/
Mac OS X can use stat.st_mtimespec not stat.st_mtim.
But GNU make checks stat.st_mtim only for high resolution timestamp checking.
(see "whether to use high resolution file timestamps" in configure.in)
I am sorry that I have no idea for this issue.
from mruby.
This is the problem depending on the file system. GNU make is not guilty.
The date resolution of HFS+ and other more filesystems is 1 second.
http://en.wikipedia.org/wiki/HFS_Plus
http://en.wikipedia.org/wiki/Ext3
If the difference of the time when libmruby.a and mrblib.o are made becomes less than 1 second and the timestamps of both files are same, this problem will occur.
from mruby.
Yeah, I've just hit this too.. I'm building on a fast OS/X machine with an SSD and I hit it almost every build. I've been doing:
$ make -j12 ; touch mrblib/mrblib.o ; make -j12
to get around it for now.
I think having multiple make rules updating "libmruby.a" is just never going to work 100% safely.. just too complicated since its effectively a circular dependency (libmruby.a -> mrbc -> libmruby.a) which is hard to get make to deal with correctly.
I think the best solution would be to just split this into two libraries (libmruby_nolib, libmruby) Doing the "ar" is fast, so doing that part twice won't affect the compile speed. This also will be needed when crosscompiling support is added (important for the embedded space!) since then you'll have to build the engine twice: once for the host processor to build the lib, and a second time for the target processor. Might as well start getting the distinction in place.
from mruby.
OK, splitting libmruby_nolib.a and libmruby.a sounds like a good idea.
from mruby.
Related Issues (20)
- When `MRB_UTF8_STRING` is enabled, giving byte characters for `String#index` and `String#split` gives wrong results HOT 3
- Parse error with required kwargs and omitted parens
- `NODE_ZSUPER` from deeply nested blocks will result in a truncated digits for block index in `OP_ARGARY` HOT 1
- `NODE_SUPER` / `NODE_ZSUPER` on the top level passes the wrong block index to `gen_blkmove()` which generates `OP_GETUPVAR`
- MSVC: can't use `malloc()` in `string.c` with `WIN32_LEAN_AND_MEAN` HOT 3
- build with build_config.rb w/mruby extensions succeeds but doesn't create SciTE binary HOT 1
- mrb_fixnum returns wrong value if integer is large HOT 1
- Segmentation fault in function get_file in debug.c HOT 3
- Mirror of prettier package for pre-commit is now archived HOT 1
- Assigning to a block variable changes the actual block (thus affecting `block_given?` and `yield`) HOT 3
- `foo :bar {}` is legal in mruby? HOT 1
- method call faile on arm v5 HOT 2
- Calling method_missing with only Kwargs passes arguments incorrectly HOT 3
- Is peephole optimization done by mrb_load_string or only by mrbc? HOT 3
- Planned change patch for `mrb_vm_exec()` HOT 3
- Add an actual `Makefile` to the sources HOT 11
- Double free during GC sweep HOT 1
- mrb_gc_register() may cause GC and collect the object being protected HOT 2
- Detect โUse-after-freeโ with address sanitizer HOT 5
- Is possible change this line in gc.h ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mruby.