DReichLab / DReichLab/EIG

needs to link with -llapack

Open
#8 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
207
Forks
61
PR merge metrics
No merged PRs in 30d

Description

The linker complains about undefined references:

eigensrc/eigx.o: In function `eigx_':
eigx.c:(.text+0x14b): undefined reference to `dspev_'
eigensrc/eigx.o: In function `eigxv_':
eigx.c:(.text+0x220): undefined reference to `dspev_'
eigensrc/eigx.o: In function `cdc_':
eigx.c:(.text+0x29b): undefined reference to `dpotrf_'
eigensrc/eigx.o: In function `inverse_':
eigx.c:(.text+0x396): undefined reference to `dgetrf_'
eigx.c:(.text+0x3f7): undefined reference to `dgetri_'
eigensrc/eigx.o: In function `solve_':
eigx.c:(.text+0x4d7): undefined reference to `dgetrf_'
eigx.c:(.text+0x536): undefined reference to `dgetrs_'
eigensrc/eigx.o: In function `geneigsolve_':
eigx.c:(.text+0x602): undefined reference to `dsygv_'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'eigensrc/pcatoy' failed
make: *** [eigensrc/pcatoy] Error 1
eigx.o: In function `eigx_':
eigx.c:(.text+0x14b): undefined reference to `dspev_'
eigx.o: In function `eigxv_':
eigx.c:(.text+0x220): undefined reference to `dspev_'
eigx.o: In function `cdc_':
eigx.c:(.text+0x29b): undefined reference to `dpotrf_'
eigx.o: In function `inverse_':
eigx.c:(.text+0x396): undefined reference to `dgetrf_'
eigx.c:(.text+0x3f7): undefined reference to `dgetri_'
eigx.o: In function `solve_':
eigx.c:(.text+0x4d7): undefined reference to `dgetrf_'
eigx.c:(.text+0x536): undefined reference to `dgetrs_'
eigx.o: In function `geneigsolve_':
eigx.c:(.text+0x602): undefined reference to `dsygv_'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'pca' failed
make: *** [pca] Error 1

These references come from the lapack library. By adding -llapack the linker flags this error disappears and all references are found. This is required especially when the available OpenBLAS was built without LAPACK and a separate LAPACK library is used.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the build rules for the pca and eigensrc/pcatoy targets, and inspect eigensrc/eigx.c to understand which LAPACK symbols are referenced. Reproduce the linker failure, then verify that both targets build successfully when the separate LAPACK library is available and linked.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.