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

tgt_rule changes order of dependencies #9

Closed
torpesco opened this issue Apr 16, 2013 · 5 comments
Closed

tgt_rule changes order of dependencies #9

torpesco opened this issue Apr 16, 2013 · 5 comments

Comments

@torpesco
Copy link

I had an issue where an executable failed to link. It turned out that because a static library that is a part of the build process was specified with an absolute path, it was appearing first as a dependency due to the order of assignment to abs_deps in tgt_rule -- first absolute, then relative.

Because the static library was listed first, its functions were considered "not used" and the symbols were dropped before gcc got around to looking at the object files containing references to those functions.

As a work-around, I re-ordered to have relative dependencies listed first, then absolute.

I think an ideal solution would be to figure out how to not change the order of the dependencies... but I haven't yet had a chance to look into if that's possible and what would be involved.

@ghost ghost assigned aostruszka Apr 16, 2013
@aostruszka
Copy link
Owner

Thanks for reporting!

Will take a look at that (I mean keeping the order).

@aostruszka
Copy link
Owner

James

Could you try this one: 4739467
Let me know if it solves your problem.

Best regards
Andrzej

@torpesco
Copy link
Author

Looks to me that it will. Hopefully I'll have time to test it tomorrow. Wondered if foreach would do it. Seeing the patch now, I feel lazy for not having already tried it before posting the issue. :)Thanks, James  ---Sent from my BlackBerry Z10. From: aostruszkaSent: Tuesday, April 16, 2013 04:06 PMTo: aostruszka/nonrec-makeReply To: aostruszka/nonrec-makeCc: torpescoSubject: Re: [nonrec-make] tgt_rule changes order of dependencies (#9)James

Could you try this one: 4739467
Let me know if it solves your problem.

Best regards
Andrzej

—Reply to this email directly or view it on GitHub.

@torpesco
Copy link
Author

Now I can't reproduce the original link failure, but I can confirm that code works and leaves the dependency order intact. Thanks!

@aostruszka
Copy link
Owner

Great! So I'm closing this one.
Thank you again for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants