Problem calling ldconfig in ext2root.mk
Hi -
I'm having a problem with a recent change in ext2root.mk (showed up in r19618):
- -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
+ $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
I'm using an external toolchain that doesn't have an ldconfig, so the make bombs out at this
point. The makefile used to ignore this, which was OK for my system. Should there be a check
to see if $(TARGET_LDCONFIG) exists?
Todd
Quoted 11 lines · Todd Valentic
Hi -
I'm having a problem with a recent change in ext2root.mk (showed up in r19618):
(quoted diff) +1
-1- -$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null + $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null
Quoted 5 lines
I'm using an external toolchain that doesn't have an ldconfig, so the make bombs out at this
point. The makefile used to ignore this, which was OK for my system. Should there be a check
to see if $(TARGET_LDCONFIG) exists?
Does the attached is any better?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: br2.target_ldconfig-conditional.diff
Type: text/x-diff
Size: 4164 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070824/56e4cb3b/attachment.bin
Hi Bernhard -
Thanks for taking a look at this problem.
Quoted 2 lines
Does the attached is any better?
Just tried it and unfortunately it didn't work.
$(if $(TARGET_LDCONFIG),$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
I think the problem here is that the "if" is evaluating as true because the string $(TARGET_LDCONFIG) is set. What it isn't checking is if the actual file exists.
Would a test like this work:
@test -x $(TARGET_LDCONFIG) && \
$(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/nullor should TARGET_LDCONFIG be unset early on if it doesn't exist (in which case your original patch would work fine)?
Todd