* can't compile on MacOS
@ 2024-10-25 14:31 Michal Sapka
2024-11-08 11:52 ` Tomi Ollila
[not found] ` <87h68iui5c.fsf@tethera.net>
0 siblings, 2 replies; 8+ messages in thread
From: Michal Sapka @ 2024-10-25 14:31 UTC (permalink / raw)
To: notmuch
Hey
I'm trying to compile notmuch on MacOS Sonoma, but the make can't find talloc.h
./defs.h:26:10: fatal error: 'talloc.h' file not found
#include <talloc.h>
^~~~~~~~~~
the thing is that I have in installed via brew in
/opt/homebrew/Cellar/talloc/2.4.2/include
the file talloc.h exist in that path.
The configure script has correctly found it and stored in Makefile.conf
# Flags needed to compile and link against talloc
TALLOC_CFLAGS = -I/opt/homebrew/Cellar/talloc/2.4.2/include
TALLOC_LDFLAGS = -L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc
I'm not too fluent in C so it is a problem :-)
—-
Michał
https://michal.sapka.me\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-10-25 14:31 can't compile on MacOS Michal Sapka
@ 2024-11-08 11:52 ` Tomi Ollila
[not found] ` <87h68iui5c.fsf@tethera.net>
1 sibling, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2024-11-08 11:52 UTC (permalink / raw)
To: Michal Sapka, notmuch
On Fri, Oct 25 2024, Michal Sapka wrote:
> Hey
>
> I'm trying to compile notmuch on MacOS Sonoma, but the make can't find talloc.h
>
> ./defs.h:26:10: fatal error: 'talloc.h' file not found
> #include <talloc.h>
> ^~~~~~~~~~
>
> the thing is that I have in installed via brew in
>
> /opt/homebrew/Cellar/talloc/2.4.2/include
>
> the file talloc.h exist in that path.
>
> The configure script has correctly found it and stored in Makefile.conf
>
> # Flags needed to compile and link against talloc
> TALLOC_CFLAGS = -I/opt/homebrew/Cellar/talloc/2.4.2/include
> TALLOC_LDFLAGS = -L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc
>
> I'm not too fluent in C so it is a problem :-)
CFLAGS=-I/opt/homebrew/Cellar/talloc/2.4.2/include LDFLAGS='-L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc' ./configure
may help ?
Tomi
>
> —-
> Michał
> https://michal.sapka.me\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
[not found] ` <CAMP44s11Jhbc59iBqAN6sjm_cKph_BB4rHeaeEXVOXjjDvG=hA@mail.gmail.com>
@ 2024-11-08 22:42 ` Michal Sapka
2024-11-08 23:54 ` Felipe Contreras
0 siblings, 1 reply; 8+ messages in thread
From: Michal Sapka @ 2024-11-08 22:42 UTC (permalink / raw)
To: notmuch
> Tomi and Felipe giving me snippets to configure & compile.
Hey
Ruby bindings is what I'm want to have, and I am not (at all) fluent in C but:
configure via
CFLAGS=-I/opt/homebrew/Cellar/talloc/2.4.2/include LDFLAGS='-L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc' ./config
succeded.
Then I try
make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
-I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
-L/opt/homebrew/Cellar/talloc/2.4.2/lib'
and I get
sudo make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
-I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
-L/opt/homebrew/Cellar/talloc/2.4.2/lib'
linking shared-object notmuch.bundle
Undefined symbols for architecture arm64:
"__talloc_free", referenced from:
_notmuch_rb_object_free in database.o
_notmuch_rb_object_free in directory.o
_notmuch_rb_object_free in init.o
_notmuch_rb_object_free in message.o
_notmuch_rb_object_free in messages.o
_notmuch_rb_object_free in query.o
_notmuch_rb_object_free in thread.o
...
—-
Michał
https://crys.site\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-11-08 22:42 ` Michal Sapka
@ 2024-11-08 23:54 ` Felipe Contreras
2024-11-10 21:10 ` Michal Sapka
0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2024-11-08 23:54 UTC (permalink / raw)
To: Michal Sapka; +Cc: notmuch
On Fri, Nov 8, 2024 at 4:42 PM Michal Sapka <michal@sapka.me> wrote:
> > Tomi and Felipe giving me snippets to configure & compile.
> configure via
>
> CFLAGS=-I/opt/homebrew/Cellar/talloc/2.4.2/include LDFLAGS='-L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc' ./config
>
> succeded.
>
> Then I try
>
> make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
It's either in ./configure, or directly with make, not both.
> and I get
>
> sudo make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
> linking shared-object notmuch.bundle
> Undefined symbols for architecture arm64:
> "__talloc_free", referenced from:
You can also try adding V=1 to the make command to see what it's
actually doing, but if you have libtalloc.so in
/opt/homebrew/Cellar/talloc/2.4.2/lib, the command I suggested should
work.
Can you share the Makefile that is generated in bindings/ruby/Makefile ?
--
Felipe Contreras\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-11-08 23:54 ` Felipe Contreras
@ 2024-11-10 21:10 ` Michal Sapka
2024-11-11 12:43 ` Felipe Contreras
0 siblings, 1 reply; 8+ messages in thread
From: Michal Sapka @ 2024-11-10 21:10 UTC (permalink / raw)
To: Felipe Contreras; +Cc: notmuch
On Sat, Nov 9, 2024, at 12:54 AM, Felipe Contreras wrote:
> On Fri, Nov 8, 2024 at 4:42 PM Michal Sapka <michal@sapka.me> wrote:
>> > Tomi and Felipe giving me snippets to configure & compile.
>
>> configure via
>>
>> CFLAGS=-I/opt/homebrew/Cellar/talloc/2.4.2/include LDFLAGS='-L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc' ./config
>>
>> succeded.
>>
>> Then I try
>>
>> make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
>> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
>> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
>
> It's either in ./configure, or directly with make, not both.
>
>> and I get
>>
>> sudo make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
>> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
>> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
>> linking shared-object notmuch.bundle
>> Undefined symbols for architecture arm64:
>> "__talloc_free", referenced from:
>
> You can also try adding V=1 to the make command to see what it's
> actually doing, but if you have libtalloc.so in
> /opt/homebrew/Cellar/talloc/2.4.2/lib, the command I suggested should
> work.
>
> Can you share the Makefile that is generated in bindings/ruby/Makefile ?
>
> --
> Felipe Contreras
Hey,
I tried to add cflags to only configure or make but still - talloc not found.
The Makefile:
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
V = 0
V0 = $(V:0=)
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@ :)
ECHO = $(ECHO1:0=@ echo)
NULLCMD = :
#### Start of system configuration section. ####
srcdir = .
topdir = /Users/msapka/.usr/local/rbenv/versions/3.2.2/include/ruby-3.2.0
hdrdir = $(topdir)
arch_hdrdir = /Users/msapka/.usr/local/rbenv/versions/3.2.2/include/ruby-3.2.0/arm64-darwin22
PATH_SEPARATOR = :
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
prefix = $(DESTDIR)/Users/msapka/.usr/local/rbenv/versions/3.2.2
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
rubyarchprefix = $(rubylibprefix)/$(arch)
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
exec_prefix = $(prefix)
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
sitehdrdir = $(rubyhdrdir)/site_ruby
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
vendorarchdir = $(vendorlibdir)/$(sitearch)
vendorlibdir = $(vendordir)/$(ruby_version)
vendordir = $(rubylibprefix)/vendor_ruby
sitearchdir = $(sitelibdir)/$(sitearch)
sitelibdir = $(sitedir)/$(ruby_version)
sitedir = $(rubylibprefix)/site_ruby
rubyarchdir = $(rubylibdir)/$(arch)
rubylibdir = $(rubylibprefix)/$(ruby_version)
sitearchincludedir = $(includedir)/$(sitearch)
archincludedir = $(includedir)/$(arch)
sitearchlibdir = $(libdir)/$(sitearch)
archlibdir = $(libdir)/$(arch)
ridir = $(datarootdir)/$(RI_BASE_NAME)
mandir = $(datarootdir)/man
localedir = $(datarootdir)/locale
libdir = $(exec_prefix)/lib
psdir = $(docdir)
pdfdir = $(docdir)
dvidir = $(docdir)
htmldir = $(docdir)
infodir = $(datarootdir)/info
docdir = $(datarootdir)/doc/$(PACKAGE)
oldincludedir = $(DESTDIR)/usr/include
includedir = $(SDKROOT)$(prefix)/include
runstatedir = $(localstatedir)/run
localstatedir = $(prefix)/var
sharedstatedir = $(prefix)/com
sysconfdir = $(prefix)/etc
datadir = $(datarootdir)
datarootdir = $(prefix)/share
libexecdir = $(exec_prefix)/libexec
sbindir = $(exec_prefix)/sbin
bindir = $(exec_prefix)/bin
archdir = $(rubyarchdir)
CC_WRAPPER =
CC = clang
CXX = clang++
LIBRUBY = $(LIBRUBY_SO)
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework CoreFoundation $(MAINLIBS)
empty =
OUTFLAG = -o $(empty)
COUTFLAG = -o $(empty)
CSRCFLAG = $(empty)
RUBY_EXTCONF_H =
cflags = -fdeclspec $(optflags) $(debugflags) $(warnflags)
cxxflags =
optflags = -O3 -fno-fast-math
debugflags = -ggdb3
warnflags = -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wundef
cppflags =
CCDLFLAGS = -fno-common
CFLAGS = $(CCDLFLAGS) $(cflags) -fno-common -pipe $(ARCH_FLAG)
INCFLAGS = -I. -I/Users/msapka/ghq/git.notmuchmail.org/git/notmuch/lib -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS =
CPPFLAGS = -I/Users/msapka/.usr/local/rbenv/versions/3.2.2/include -I/opt/homebrew/opt/mysql@5.7/include -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
CXXFLAGS = $(CCDLFLAGS) -fdeclspec $(ARCH_FLAG)
ldflags = -L. -L/Users/msapka/.usr/local/rbenv/versions/3.2.2/lib -L/opt/homebrew/opt/mysql@5.7/lib -fstack-protector-strong -L/opt/homebrew/opt/gmp/lib
dldflags = -L/Users/msapka/.usr/local/rbenv/versions/3.2.2/lib -L/opt/homebrew/opt/mysql@5.7/lib -L/opt/homebrew/opt/gmp/lib -Wl,-multiply_defined,suppress -Wl,-undefined,dynamic_lookup $(LIBRUBYARG_SHARED)
ARCH_FLAG =
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
LDSHARED = $(CC) -dynamic -bundle
LDSHAREDXX = $(CXX) -dynamic -bundle
AR = ar
EXEEXT =
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
RUBY_SO_NAME = ruby.3.2
RUBYW_INSTALL_NAME =
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
arch = arm64-darwin22
sitearch = $(arch)
ruby_version = 3.2.0
ruby = $(bindir)/$(RUBY_BASE_NAME)
RUBY = $(ruby)
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
RM = rm -f
RM_RF = rm -fr
RMDIRS = rmdir -p
MAKEDIRS = /opt/homebrew/bin/gmkdir -p
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_PROG = $(INSTALL) -m 0755
INSTALL_DATA = $(INSTALL) -m 644
COPY = cp
TOUCH = exit >
#### End of system configuration section. ####
preload =
libpath = . $(libdir)
LIBPATH = -L. -L$(libdir)
DEFFILE =
CLEANFILES = mkmf.log
DISTCLEANFILES =
DISTCLEANDIRS =
extout =
extout_prefix =
target_prefix =
LOCAL_LIBS = ../../lib/libnotmuch.dylib
LIBS = $(LIBRUBYARG_SHARED) -lpthread -ltalloc
ORIG_SRCS = database.c directory.c filenames.c init.c message.c messages.c query.c status.c tags.c thread.c threads.c
SRCS = $(ORIG_SRCS)
OBJS = database.o directory.o filenames.o init.o message.o messages.o query.o status.o tags.o thread.o threads.o
HDRS = $(srcdir)/defs.h
LOCAL_HDRS =
TARGET = notmuch
TARGET_NAME = notmuch
TARGET_ENTRY = Init_$(TARGET_NAME)
DLLIB = $(TARGET).bundle
EXTSTATIC =
STATIC_LIB =
TIMESTAMP_DIR = .
BINDIR = $(bindir)
RUBYCOMMONDIR = $(vendordir)$(target_prefix)
RUBYLIBDIR = $(vendorlibdir)$(target_prefix)
RUBYARCHDIR = $(vendorarchdir)$(target_prefix)
HDRDIR = $(vendorhdrdir)$(target_prefix)
ARCHHDRDIR = $(vendorarchhdrdir)$(target_prefix)
TARGET_SO_DIR =
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
CLEANLIBS = $(TARGET_SO) $(TARGET_SO).dSYM
CLEANOBJS = $(OBJS) *.bak
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.vendorarchdir.time
all: $(DLLIB)
static: $(STATIC_LIB)
.PHONY: all install static install-so install-rb
.PHONY: clean clean-so clean-static clean-rb
clean-static::
clean-rb-default::
clean-rb::
clean-so::
clean: clean-so clean-static clean-rb-default clean-rb
-$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
distclean-rb-default::
distclean-rb::
distclean-so::
distclean-static::
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
realclean: distclean
install: install-so install-rb
install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
clean-static::
-$(Q)$(RM) $(STATIC_LIB)
install-rb: pre-install-rb do-install-rb install-rb-default
install-rb-default: pre-install-rb-default do-install-rb-default
pre-install-rb: Makefile
pre-install-rb-default: Makefile
do-install-rb:
do-install-rb-default:
pre-install-rb-default:
@$(NULLCMD)
$(TARGET_SO_DIR_TIMESTAMP):
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
$(Q) $(TOUCH) $@
site-install: site-install-so site-install-rb
site-install-so: install-so
site-install-rb: install-rb
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
.cc.o:
$(ECHO) compiling $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.cc.S:
$(ECHO) translating $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
.mm.o:
$(ECHO) compiling $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.mm.S:
$(ECHO) translating $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
.cxx.o:
$(ECHO) compiling $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.cxx.S:
$(ECHO) translating $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
.cpp.o:
$(ECHO) compiling $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.cpp.S:
$(ECHO) translating $(<)
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
.c.o:
$(ECHO) compiling $(<)
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.c.S:
$(ECHO) translating $(<)
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
.m.o:
$(ECHO) compiling $(<)
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
.m.S:
$(ECHO) translating $(<)
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
$(TARGET_SO): $(OBJS) Makefile
$(ECHO) linking shared-object $(DLLIB)
-$(Q)$(RM) $(@)
$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
$(Q) $(POSTLINK)
$(OBJS): $(HDRS) $(ruby_headers)\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-11-10 21:10 ` Michal Sapka
@ 2024-11-11 12:43 ` Felipe Contreras
2024-11-12 10:02 ` Michal Sapka
0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2024-11-11 12:43 UTC (permalink / raw)
To: Michal Sapka; +Cc: notmuch
On Sun, Nov 10, 2024 at 3:11 PM Michal Sapka <michal@sapka.me> wrote:
>
>
>
> On Sat, Nov 9, 2024, at 12:54 AM, Felipe Contreras wrote:
> > On Fri, Nov 8, 2024 at 4:42 PM Michal Sapka <michal@sapka.me> wrote:
> >> > Tomi and Felipe giving me snippets to configure & compile.
> >
> >> configure via
> >>
> >> CFLAGS=-I/opt/homebrew/Cellar/talloc/2.4.2/include LDFLAGS='-L/opt/homebrew/Cellar/talloc/2.4.2/lib -ltalloc' ./config
> >>
> >> succeded.
> >>
> >> Then I try
> >>
> >> make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
> >> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
> >> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
> >
> > It's either in ./configure, or directly with make, not both.
> >
> >> and I get
> >>
> >> sudo make -C bindings/ruby CFLAGS='-g -O2 -pipe -fno-plt -fPIC
> >> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
> >> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
> >> linking shared-object notmuch.bundle
> >> Undefined symbols for architecture arm64:
> >> "__talloc_free", referenced from:
> >
> > You can also try adding V=1 to the make command to see what it's
> > actually doing, but if you have libtalloc.so in
> > /opt/homebrew/Cellar/talloc/2.4.2/lib, the command I suggested should
> > work.
> >
> > Can you share the Makefile that is generated in bindings/ruby/Makefile ?
> >
> > --
> > Felipe Contreras
>
> Hey,
>
> I tried to add cflags to only configure or make but still - talloc not found.
It's not just CFLAGS, you need to set LIBPATH too. According to the
Makefile that should work. Did you try adding V=1 too? What's the
final link command?
make -C bindings/ruby V=1 CFLAGS='-g -O2 -pipe -fno-plt -fPIC
-I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
-L/opt/homebrew/Cellar/talloc/2.4.2/lib'
--
Felipe Contreras\r
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-11-11 12:43 ` Felipe Contreras
@ 2024-11-12 10:02 ` Michal Sapka
2024-11-12 20:21 ` David Bremner
0 siblings, 1 reply; 8+ messages in thread
From: Michal Sapka @ 2024-11-12 10:02 UTC (permalink / raw)
To: Felipe Contreras; +Cc: notmuch
On Mon, Nov 11, 2024, at 1:43 PM, Felipe Contreras wrote:
> It's not just CFLAGS, you need to set LIBPATH too. According to the
> Makefile that should work. Did you try adding V=1 too? What's the
> final link command?
>
> make -C bindings/ruby V=1 CFLAGS='-g -O2 -pipe -fno-plt -fPIC
> -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib
> -L/opt/homebrew/Cellar/talloc/2.4.2/lib'
>
> --
> Felipe Contreras
I cleaned the entire local repo dir
./configure:
Welcome to Notmuch, a system for indexing, searching and tagging your email.
We hope that the process of building and installing notmuch is quick
and smooth so that you can soon be reading and processing your email
more efficiently than ever.
If anything goes wrong in the configure process, you can override any
decisions it makes by manually editing the Makefile.config file that
it creates. Also please do as much as you can to figure out what could
be different on your machine compared to those of the notmuch
developers. Then, please email those details to the Notmuch list
(notmuch@notmuchmail.org) so that we can hopefully make future
versions of notmuch easier for you to use.
We'll now investigate your system to verify that all required
dependencies are available:
Sanity checking C compilation environment... OK.
Sanity checking C++ compilation environment... OK.
C compiler supports address sanitizer... Yes.
C compiler supports thread sanitizer... minimal(22043,0x2057f8f40) malloc: nano zone abandoned due to inability to reserve vm space.
Yes.
Reading libnotmuch version from source... OK.
Checking for Xapian development files (>= 1.4.0)... Yes (1.4.26).
Checking for GMime development files (>= 3.0.3)... Yes.
Checking for GMime session key extraction support... OK.
Checking for GMime X.509 certificate validity... Yes.
Checking whether GMime emits email addresses with angle brackets... No.
Checking signature verification when decrypting using session keys... Yes.
Checking for Glib development files (>= 2.22)... Yes.
Checking for zlib (>= 1.2.5.2)... Yes.
Checking for talloc development files... Yes.
Checking for bash... Yes (/bin/bash).
Checking for perl... Yes (/usr/bin/perl).
Checking for python... Yes (python3).
Checking for python3 (>= 3.5)...Yes.
Checking for python3 version ...(3.13)
Checking for python 3.13 development files...Yes.
Checking for python3 cffi and setuptools... Yes.
Checking for python3 pytest (>= 3.0)... No (will not test CFFI-based python bindings).
Checking for valgrind development files... No (but that's fine).
Checking for bash-completion (>= 1.90)... No (will not install bash completion).
Checking for sfsexp... No (will not enable s-expression queries).
Checking if emacs (>= 25) is available... Yes.
Checking if doxygen is available... No (so will not install api docs)
Checking for ruby development files... Yes.
Checking if sphinx is available and supports nroff output... No (so will not install man pages).
Checking if makeinfo is available... Yes.
Checking if install-info is available... Yes.
Checking if desktop-file-install is available... No (so will not install .desktop file).
Checking for cppcheck... No.
Checking which platform we are on... Mac OS X.
Checking for canonicalize_file_name... No (will use our own instead).
Checking for getline... Yes.
Checking for strcasestr... Yes.
Checking for strsep... Yes.
Checking for timegm... Yes.
Checking for 64 bit time_t... Yes.
Checking for dirent.d_type... Yes.
Checking for standard version of getpwuid_r... Yes.
Checking for standard version of asctime_r... Yes.
Checking for rpath support... No (nothing to worry about).
Checking for -Wl,--as-needed... No (nothing to worry about).
Checking for -Wl,--no-undefined... No (nothing to worry about).
Checking for available C++ compiler warning flags...
-Wall -Wextra -Wwrite-strings
Checking for available C compiler warning flags...
-Wall -Wextra -Wwrite-strings -Wmissing-declarations
All required packages were found. You may now run the following
commands to compile and install notmuch:
make
--------------
sudo make -C bindings/ruby V=1 CFLAGS='-g -O2 -pipe -fno-plt -fPIC -I/opt/homebrew/Cellar/talloc/2.4.2/include' LIBPATH='-L. -L/usr/lib -L/opt/homebrew/Cellar/talloc/2.4.2/lib':
make: Nothing to be done for `all'.
------------
but the above without specyfing the -C bindings/ruby finished
(...)
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-tag.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/coolj.el emacs/coolj.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/coolj.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/notmuch-print.el emacs/notmuch-print.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-print.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/notmuch-version.el emacs/notmuch-version.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-version.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/notmuch-jump.el emacs/notmuch-jump.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-jump.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/notmuch-company.el emacs/notmuch-company.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-company.el (source)...
emacs --quick -batch -L emacs -l rstdoc -f rstdoc-batch-extract emacs/notmuch-draft.el emacs/notmuch-draft.rsti
Loading /Users/msapka/ghq/git.notmuchmail.org/git/notmuch/emacs/notmuch-draft.el (source)...
Missing sphinx or makeinfo, not building info pages
Compilation of notmuch is now complete. You can install notmuch with:
make install
---------
then I can install
sudo make install
Missing sphinx or makeinfo, not building info pages
No sphinx, will not install man pages.
Missing prerequisites, not installing info pages
mkdir -p "/usr/local/lib/"
install -m0644 "lib/libnotmuch.5.6.0.dylib" "/usr/local/lib/"
ln -sf libnotmuch.5.6.0.dylib "/usr/local/lib/libnotmuch.5.dylib"
ln -sf libnotmuch.5.6.0.dylib "/usr/local/lib/libnotmuch.dylib"
mkdir -p "/usr/local/include"
install -m0644 "./lib/notmuch.h" "/usr/local/include/"
install-completion
mkdir -p "/usr/local/share/zsh/site-functions"
install -m0644 ./completion/zsh/_notmuch ./completion/zsh/_email-notmuch "/usr/local/share/zsh/site-functions"
mkdir -p "/usr/local/share/emacs/site-lisp"
install -m0644 emacs/notmuch-lib.el emacs/notmuch-compat.el emacs/notmuch-parser.el emacs/notmuch.el emacs/notmuch-query.el emacs/notmuch-show.el emacs/notmuch-tree.el emacs/notmuch-wash.el emacs/notmuch-hello.el emacs/notmuch-mua.el emacs/notmuch-address.el emacs/notmuch-maildir-fcc.el emacs/notmuch-message.el emacs/notmuch-crypto.el emacs/notmuch-tag.el emacs/coolj.el emacs/notmuch-print.el emacs/notmuch-version.el emacs/notmuch-jump.el emacs/notmuch-company.el emacs/notmuch-draft.el "/usr/local/share/emacs/site-lisp"
install -m0644 emacs/notmuch-lib.elc emacs/notmuch-compat.elc emacs/notmuch-parser.elc emacs/notmuch.elc emacs/notmuch-query.elc emacs/notmuch-show.elc emacs/notmuch-tree.elc emacs/notmuch-wash.elc emacs/notmuch-hello.elc emacs/notmuch-mua.elc emacs/notmuch-address.elc emacs/notmuch-maildir-fcc.elc emacs/notmuch-message.elc emacs/notmuch-crypto.elc emacs/notmuch-tag.elc emacs/coolj.elc emacs/notmuch-print.elc emacs/notmuch-version.elc emacs/notmuch-jump.elc emacs/notmuch-company.elc emacs/notmuch-draft.elc "/usr/local/share/emacs/site-lisp"
mkdir -p "/usr/local/share/emacs/site-lisp"
install -m0644 ./emacs/notmuch-logo.svg "/usr/local/share/emacs/site-lisp"
mkdir -p "/usr/local/bin/"
sed "1s|^#!.*|#! /bin/bash|" < emacs/notmuch-emacs-mua > /usr/local/bin/notmuch-emacs-mua
chmod 755 /usr/local/bin/notmuch-emacs-mua
mkdir -p "/usr/local/bin/"
install notmuch-shared "/usr/local/bin/notmuch"
Notmuch is now installed to /usr/local
New users should simply run "notmuch" to be guided
through the process of configuring notmuch and creating
a database of existing email messages. The "notmuch"
command will also offer some sample search commands.
Beyond the command-line interface, notmuch also offers
a full-featured interface for reading and writing mail
within emacs. To use this, each user should add the
following line to the ~/.emacs file:
(require 'notmuch)
And then run emacs as "emacs -f notmuch" or invoke
the command "M-x notmuch" from within emacs.
--------
I can now use 'notmuch' from IRB, so everything is woring!
--------
guess the problem was that I didn't notice that "make clean" left some files cached:
_check_email.dSYM/
_check_session_keys.dSYM/
_check_x509_validity.dSYM/
_libversion.dSYM/
_verify_sig_with_session_key.dSYM/
minimal.dSYM/
--------
Thanks You!
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: can't compile on MacOS
2024-11-12 10:02 ` Michal Sapka
@ 2024-11-12 20:21 ` David Bremner
0 siblings, 0 replies; 8+ messages in thread
From: David Bremner @ 2024-11-12 20:21 UTC (permalink / raw)
To: Michal Sapka, Felipe Contreras; +Cc: notmuch
"Michal Sapka" <michal@sapka.me> writes:
>
> guess the problem was that I didn't notice that "make clean" left some files cached:
>
> _check_email.dSYM/
> _check_session_keys.dSYM/
> _check_x509_validity.dSYM/
> _libversion.dSYM/
> _verify_sig_with_session_key.dSYM/
> minimal.dSYM/
Anyone what is making those .dSYM files? My guess is that they are macOS
specific byproducts of running configure, as those names look like
binaries build by the configure script.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-12 20:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 14:31 can't compile on MacOS Michal Sapka
2024-11-08 11:52 ` Tomi Ollila
[not found] ` <87h68iui5c.fsf@tethera.net>
[not found] ` <CAMP44s11Jhbc59iBqAN6sjm_cKph_BB4rHeaeEXVOXjjDvG=hA@mail.gmail.com>
2024-11-08 22:42 ` Michal Sapka
2024-11-08 23:54 ` Felipe Contreras
2024-11-10 21:10 ` Michal Sapka
2024-11-11 12:43 ` Felipe Contreras
2024-11-12 10:02 ` Michal Sapka
2024-11-12 20:21 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).