GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add more lib dir search options for build script by 9prady9 · Pull Request #119 · arrayfire/arrayfire-rust

Conversation

@9prady9

@9prady9 9prady9 commented Mar 21, 2017

Copy link
Copy Markdown
Member

Fixes #118

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@9prady9
9prady9 requested review from jramapuram and pavanky March 21, 2017 08:34
pavanky
pavanky reviewed Mar 21, 2017
View reviewed changes
Comment thread build.rs Outdated
Err(_) => panic!("Error use_lib is defined, but AF_PATH is not defined"),
Err(_) => {
println!("WARNING! USE_LIB IS DEFINED, BUT AF_PATH IS NOT DEFINED, TRYING TO FIND LIBRARIES FROM KNOWN DEFAULT LOCATIONS");
PathBuf::from("/usr/")

@pavanky pavanky Mar 21, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what is happening here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@9prady9 9prady9 Mar 21, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no AF_PATH, it will look for libraries in some predefined paths for platforms. If there is AF_PATH, it will also be included into the search paths.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jramapuram jramapuram Mar 23, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but shouldn't we look into /usr/local by default? Isn't that the default AF_PATH?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@9prady9 9prady9 Mar 24, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread build.rs
PathBuf::from("/usr/")
},
};
let libpath = afpath.join("lib");

@pavanky pavanky Mar 21, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not be an error if AF_PATH is empty ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@9prady9 9prady9 Mar 21, 2017

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, there won't be error. I think we can panic or use some default paths. We are not checking for existence of the libraries, we are only adding paths like -L we use for gcc/g++ link options. If required library is not present in any of search paths, it will throw linking errors.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@jramapuram jramapuram Mar 23, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afpath will never be None. Under the Err it is being set to another path location. I.e. error is handled when AF_PATH is not set.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jramapuram
jramapuram reviewed Mar 23, 2017
View reviewed changes

@jramapuram jramapuram left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good minus the one comment

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread build.rs Outdated
Err(_) => panic!("Error use_lib is defined, but AF_PATH is not defined"),
Err(_) => {
println!("WARNING! USE_LIB IS DEFINED, BUT AF_PATH IS NOT DEFINED, TRYING TO FIND LIBRARIES FROM KNOWN DEFAULT LOCATIONS");
PathBuf::from("/usr/")

@jramapuram jramapuram Mar 23, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but shouldn't we look into /usr/local by default? Isn't that the default AF_PATH?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread build.rs
PathBuf::from("/usr/")
},
};
let libpath = afpath.join("lib");

@jramapuram jramapuram Mar 23, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afpath will never be None. Under the Err it is being set to another path location. I.e. error is handled when AF_PATH is not set.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@9prady9
9prady9 force-pushed the build_lib_search_options branch from 99f8d03 to c9cdc36 Compare March 24, 2017 03:07
@9prady9
9prady9 requested review from jramapuram and pavanky March 24, 2017 03:08
@9prady9

9prady9 commented Mar 24, 2017

Copy link
Copy Markdown
Member Author

@pavanky @jramapuram I have made some changes based on the feedback. Please review the latest once again. Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@9prady9
9prady9 force-pushed the build_lib_search_options branch from c9cdc36 to 02cd6dd Compare March 24, 2017 03:50
@9prady9 9prady9 changed the title Add more lib dir search options for build script [WIP] Add more lib dir search options for build script Mar 24, 2017
@9prady9
9prady9 removed request for jramapuram and pavanky March 24, 2017 04:13
@9prady9
Add more lib dir search options for build script
f0b2ae2
@9prady9
9prady9 force-pushed the build_lib_search_options branch from 02cd6dd to f0b2ae2 Compare March 24, 2017 04:23
@9prady9
9prady9 requested review from jramapuram and pavanky March 24, 2017 04:24
@9prady9 9prady9 changed the title [WIP] Add more lib dir search options for build script Add more lib dir search options for build script Mar 24, 2017
@jramapuram

jramapuram commented Mar 24, 2017

Copy link
Copy Markdown
Member

@9prady9 : looks good to me!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@9prady9
Add note regarding std::ops traits for Array documentation
4841305
@9prady9
9prady9 removed request for jramapuram and pavanky March 25, 2017 03:11
@9prady9
9prady9 merged commit d3f240d into arrayfire:devel Mar 25, 2017
@9prady9
9prady9 deleted the build_lib_search_options branch March 25, 2017 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pavanky pavanky pavanky left review comments
@jramapuram jramapuram jramapuram left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@9prady9 @jramapuram @pavanky
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.