Skip to content

[WIP] Fix implicit declaration of function 'cblas_idamax'#232

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/fix-cblas-idamax-warning
Draft

[WIP] Fix implicit declaration of function 'cblas_idamax'#232
Copilot wants to merge 1 commit intomainfrom
copilot/fix-cblas-idamax-warning

Conversation

Copy link

Copilot AI commented Feb 26, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>implicit declaration of function 'cblas_idamax'</issue_title>
<issue_description>### Describe the bug

When compile blas_test.v, it will issue warning implicit declaration of function 'cblas_idamax', this should be fixed.

Related to vlang/v#26343
https://github.com/vlang/v/actions/runs/20957079842/job/60224272485?pr=26343

Expected Behavior

no implicit declaration of function 'cblas_idamax' warnings

Current Behavior

$ v vsl/blas/blas_test.v -showcc -keepc -d vsl_blas_cblas  -show-c-output
> C compiler cmd: '/media/HD/github/kbkpbot/v/thirdparty/tcc/tcc.exe' '@/tmp/v_1000/blas_test.tmp.c.rsp'
> C compiler response file "/tmp/v_1000/blas_test.tmp.c.rsp":
  -fwrapv -o "/home/mars/.vmodules/vsl/blas/blas_test" -D GC_THREADS=1 -D GC_BUILTIN_ATOMIC=1 -I "/media/HD/github/kbkpbot/v/thirdparty/libgc/include" -I "/media/HD/github/kbkpbot/v/thirdparty/stdatomic/nix" -O2 -I "/usr/local/include" -I "/usr/lib" -L "/usr/local/lib" -L "/usr/lib" -I "/home/mars/.vmodules/vsl/blas" "/tmp/v_1000/blas_test.tmp.c" -std=c99 -D_DEFAULT_SOURCE -bt25 "/media/HD/github/kbkpbot/v/thirdparty/tcc/lib/libgc.a" -ldl -lpthread -lm -lopenblas
======== Output of the C Compiler (/media/HD/github/kbkpbot/v/thirdparty/tcc/tcc.exe) ========
/tmp/v_1000/blas_test.tmp.c:11572: warning: implicit declaration of function 'cblas_idamax'
/tmp/v_1000/blas_test.tmp.c:11575: warning: implicit declaration of function 'cblas_daxpy'
/tmp/v_1000/blas_test.tmp.c:11578: warning: implicit declaration of function 'cblas_dcopy'
/tmp/v_1000/blas_test.tmp.c:11581: warning: implicit declaration of function 'cblas_dswap'
/tmp/v_1000/blas_test.tmp.c:11584: warning: implicit declaration of function 'cblas_dscal'
/tmp/v_1000/blas_test.tmp.c:11587: warning: implicit declaration of function 'cblas_dgemv'
/tmp/v_1000/blas_test.tmp.c:11590: warning: implicit declaration of function 'cblas_dger'
/tmp/v_1000/blas_test.tmp.c:11593: warning: implicit declaration of function 'cblas_dsyr2k'
/tmp/v_1000/blas_test.tmp.c:11596: warning: implicit declaration of function 'cblas_dtrmm'
/tmp/v_1000/blas_test.tmp.c:11599: warning: implicit declaration of function 'cblas_dtrsm'
/tmp/v_1000/blas_test.tmp.c:11602: warning: implicit declaration of function 'cblas_dgemm'
==============================================================================================

Reproduction Steps

v vsl/blas/blas_test.v -showcc -keepc -d vsl_blas_cblas  -show-c-output

Possible Solution

Fix blas and make sure include "cblas.h"

Additional Information/Context

No response

V version

V 0.5.0 412c7b0368469a8c386ea45e0775abbe780a1929

Version used

current

Environment details (OS name and version, etc.)

V full version V 0.5.0 412c7b0368469a8c386ea45e0775abbe780a1929
OS linux, Ubuntu 24.04.3 LTS
Processor 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
Memory 11.72GB/15.51GB
V executable /media/HD/github/kbkpbot/v/v
V last modified time 2026-01-14 06:08:53
V home dir OK, value: /media/HD/github/kbkpbot/v
VMODULES OK, value: /home/mars/.vmodules
VTMP OK, value: /tmp/v_1000
Current working dir OK, value: /home/mars/.vmodules/vsl/blas
Git version git version 2.43.0
V git status weekly.2025.52-185-ge32aa73a-dirty
.git/config present true
cc version cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
gcc version gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
clang version Ubuntu clang version 18.1.3 (1ubuntu1)
tcc version tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
tcc git status thirdparty-linux-amd64 696c1d84
emcc version N/A
glibc version ldd (Ubuntu GLIBC 2.39-0ubuntu8.6) 2.39
</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@github-actions
Copy link

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Warnings Elapsed time
❌ REPOSITORY checkov yes 10 no 18.62s
❌ REPOSITORY devskim yes 1 1 7.47s
✅ REPOSITORY dustilock yes no no 0.01s
✅ REPOSITORY gitleaks yes no no 11.7s
✅ REPOSITORY git_diff yes no no 0.05s
✅ REPOSITORY grype yes no no 29.0s
❌ REPOSITORY kics yes 16 no 2.11s
✅ REPOSITORY secretlint yes no no 2.18s
✅ REPOSITORY syft yes no no 1.02s
❌ REPOSITORY trivy yes 1 no 8.01s
✅ REPOSITORY trivy-sbom yes no no 0.16s
✅ REPOSITORY trufflehog yes no no 2.51s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

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

Successfully merging this pull request may close these issues.

implicit declaration of function 'cblas_idamax'

2 participants