feat: add C and Fortran implementation for blas/base/srotg#987
feat: add C and Fortran implementation for blas/base/srotg#987Pranavchiku wants to merge 20 commits intostdlib-js:developfrom
blas/base/srotg#987Conversation
|
When I try to run c examples, it throws me the following log $ make examples-c EXAMPLES_FILTER=.*/blas/base/srotg/.*
Running example: /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/examples/c/example.c
make[1]: Entering directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/examples/c'
make[1]: Leaving directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/examples/c'
Resolving package path...
Package path: /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg
Resolving package manifest...
Successfully resolved package manifest.
Resolving include directories...
Resolving source files...
Resolving libraries...
Resolving library paths...
Compiling example...
make[1]: Entering directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/examples/c'
../../src/srotg.c:20:10: fatal error: stdlib/math/base/special/absf.h: No such file or directory
20 | #include "stdlib/math/base/special/absf.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:107: example.out] Error 1
make[1]: Leaving directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/examples/c'
Error when attempting to compile example.
ERROR: An error was encountered during execution.
make: *** [/home/pranavchiku/stdlib/tools/make/lib/examples/c.mk:48: examples-c] Error 1 |
| * @param s sine of the rotation angle | ||
| */ | ||
| void c_srotg( float *a, float *b, float *c, float *s ) { | ||
| float scale; |
There was a problem hiding this comment.
I believe this should be TAB indentation. Ensure you have EditorConfig enabled.
|
@Pranavchiku How are you running the example mentioned above? E.g., what is the command you are running? Also, how have you tried debugging this already? |
|
Feel free to push up the example code and associated Makefile. Without being able to see the files, hard to debug. |
|
Can you also add an |
Everything else looks fine, I tried playing with package.json and manifest.json but was not able to resolve this. |
I am not sure. Do you mean |
|
I mean in the "directories" field, along with |
| "doc": "./docs", | ||
| "example": "./examples", | ||
| "lib": "./lib", | ||
| "src": "./src", |
There was a problem hiding this comment.
E.g.,
.There was a problem hiding this comment.
Still, I get the same error
|
Am able to reproduce locally. Debugging now... |
|
Okay. I know what the problem is. Working on a fix. |
|
Should work now. In short, we need to update the build configurations to allow for using |
|
Okay, perfect! I will add rest of the files by today. Thank you for resolving this. |
|
@kgryte I guess When I try to build node addons It throws $ make install-node-addons NODE_ADDONS_PATTERN=blas/base/srotg
Cleaning add-on: /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg
make[1]: Entering directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/src'
make[1]: Leaving directory '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/src'
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@16.19.0 | linux | x64
gyp info ok
Building add-on: /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg
gyp info it worked if it ends with ok
gyp info using node-gyp@6.1.0
gyp info using node@16.19.0 | linux | x64
gyp info find Python using Python version 3.9.12 found at "/home/pranavchiku/conda_root/bin/python3"
(node:38420) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /home/pranavchiku/conda_root/bin/python3
gyp info spawn args [
gyp info spawn args '/home/pranavchiku/stdlib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pranavchiku/stdlib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pranavchiku/.cache/node-gyp/16.19.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/pranavchiku/.cache/node-gyp/16.19.0',
gyp info spawn args '-Dnode_gyp_dir=/home/pranavchiku/stdlib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/pranavchiku/.cache/node-gyp/16.19.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
[eval]:1
var arr = require('@stdlib/utils/library-manifest')('./manifest.json',{'os':'linux','blas':''},{'basedir':process.cwd(),'paths':'posix'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }
^
TypeError: Cannot read properties of undefined (reading 'length')
at [eval]:1:173
at Script.runInThisContext (node:vm:129:12)
at Object.runInThisContext (node:vm:313:38)
at node:internal/process/execution:79:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:78:60)
at node:internal/main/eval_string:27:3
gyp: Call to 'node -e "var arr = require('@stdlib/utils/library-manifest')('./manifest.json',{'os':'linux','blas':''},{'basedir':process.cwd(),'paths':'posix'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/pranavchiku/stdlib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Linux 5.19.0-38-generic
gyp ERR! command "/home/pranavchiku/.nvm/versions/node/v16.19.0/bin/node" "/home/pranavchiku/stdlib/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg
gyp ERR! node -v v16.19.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
Error: failed to build add-on: /home/pranavchiku/stdlib/lib/node_modules/@stdlib/blas/base/srotg |
@stdlib/blas/base/srotgblas/base/srotg
blas/base/srotgblas/base/srotg
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
/stdlib merge |
|
/stdlib update-copyright-years |
@MeKaustubh07, the slash command failed to complete. Please check the workflow logs for details. |
|
@kgryte ready for review |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Progresses #2039.
Description
This pull request:
@stdlib/blas/base/srotg@stdlib/blas/base/srotg@stdlib/blas/base/srotgRelated Issues
This pull request has the following related issues:
Questions
No.
Other
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
{{TODO: add disclosure if applicable}}
@stdlib-js/reviewers