Opened 4 years ago
Closed 4 years ago
#63665 closed defect (fixed)
notmuch @0.34 build fails with "ld: symbol(s) not found for architecture x86_64"
| Reported by: | rseichter (Ralph Seichter) | Owned by: | mascguy (Christopher Nielsen) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
| Port: | notmuch |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I am in the process of bumping the mail/notmuch port to version 0.34 and see the following error messages:
cd bindings/python-cffi && \
/opt/local/bin/python3.9 setup.py build --build-lib build/stage && \
mkdir -p build/stage/tests && cp tests/*.py build/stage/tests
ld: warning: dylib (/opt/local/lib/libgmime-3.0.dylib) was built for newer macOS version (11.2) than being linked (11.0)
ld: warning: dylib (/opt/local/lib/libxapian.dylib) was built for newer macOS version (11.2) than being linked (11.0)
Undefined symbols for architecture x86_64:
"_notmuch_query_create_with_syntax", referenced from:
_print_count in notmuch-count.o
_notmuch_database_dump in notmuch-dump.o
_notmuch_reindex_command in notmuch-reindex.o
_notmuch_reply_command in notmuch-reply.o
__notmuch_search_prepare in notmuch-search.o
_notmuch_show_command in notmuch-show.o
_tag_query in notmuch-tag.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [notmuch-shared] Error 1
Any suggestions regarding how best to deal with this issue? I found a similar ticket #63612 for "quassel", but I am unsure if this is something that can be fixed in notmuch's Portfile or requires an upstream change.
Attachments (1)
Change History (10)
Changed 4 years ago by rseichter (Ralph Seichter)
comment:1 Changed 4 years ago by mascguy (Christopher Nielsen)
| Owner: | set to mascguy |
|---|---|
| Status: | new → assigned |
comment:2 Changed 4 years ago by mascguy (Christopher Nielsen)
Can you confirm whether there was a prior active version of this port, when testing the update?
comment:3 Changed 4 years ago by rseichter (Ralph Seichter)
There is indeed an existing active version of notmuch on my build machine:
❯ port installed notmuch The following ports are currently installed: notmuch @0.33.1_0 (active)
comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)
Does it succeed if you forcibly deactivate the previous version, like what was required before?
comment:5 Changed 4 years ago by rseichter (Ralph Seichter)
Yes, this method still works. I wish I had thought of trying it myself.
❯ sudo port deactivate notmuch Password: ---> Deactivating notmuch @0.33.1_0 ---> Cleaning notmuch ❯ sudo port install -s -c ---> Computing dependencies for notmuch ---> Building notmuch ---> Staging notmuch into destroot ---> Installing notmuch @0.34_0 ---> Activating notmuch @0.34_0 ---> Cleaning notmuch ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found.
comment:6 Changed 4 years ago by Christopher Nielsen <mascguy@…>
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:7 Changed 4 years ago by rseichter (Ralph Seichter)
Now that you have reverted your changes, I have opened pull request https://github.com/macports/macports-ports/pull/12679 for notmuch version 0.34.
comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | ryandesign added |
|---|---|
| Description: | modified (diff) |
| Resolution: | fixed |
| Status: | closed → reopened |
comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |

This is likely related to yesterday's fix, to eliminate the need to forcibly deactivate the previous version during an upgrade (issue:63274). Commit:
https://github.com/macports/macports-ports/commit/c69c26cfc573075d1260e30ba2cd9c42033b8ab6
My guess is that we also need to change the library search order as well. I'll take a look, and try to get back to you within the next hour or two.