Problem with Installation on Intel Core i7, macOS Ventura 13.6 system

Hi all,

I would really appreciate any advice or help in getting AFNI installed. I have been using the Quick Setup guideline for General Users, but I keep getting the following error when I try to run part E
tcsh OS_notes.macos_12_intel_b_user.tcsh:

error: failed run_cmd: make AFNI_WHOMADEIT=build itall >& log_make.txt
-- status: building FAILURE
   see 'make' log file /Users/chatt/afni_build/build_src/log_make.txt
** error: tail from log_make.txt:

I did some debugging and found this configuration error message in the log_make.txt which I think might be causing the problem but am not sure what to do next.

ld: warning: -multiply_defined is obsolete
( cd jpeg-6b ; /bin/rm -f Makefile jconfig.h ;               \
          chmod ugo+x ./configure ; ./configure 'CC=/usr/local/bin/gcc-13' 'LDFLAGS=-L. -L/usr/local/lib -L/opt/X11/lib -L/usr/local/lib -Wl,-x -Wl,-multiply_defined -Wl,warning -Wl,-bind_at_load ' ; \
          make ; /bin/mv -f cjpeg djpeg libjpeg.a .. ;            \
          make clean ; /bin/rm -f Makefile )
checking for gcc... /usr/local/bin/gcc-13
checking whether the C compiler (/usr/local/bin/gcc-13  -L. -L/usr/local/lib -L/opt/X11/lib -L/usr/local/lib -Wl,-x -Wl,-multiply_defined -Wl,warning -Wl,-bind_at_load ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make[1]: *** No targets specified and no makefile found.  Stop.

If anyone has any advice on how to proceed, please let me know. I tried a couple of things like changing the gcc to gcc-13 which did not work.

Thank you so much!

Hello,

Do you have an older version of homebrew, or was it just installed vie the quick setup commands?
What is the output from:

ls -l /usr/local/bin/gcc*

Thanks,

  • rick

Hi!

Thanks for your reply, I used the quick setup commands.

Version of homebrew:
Homebrew 4.1.16-2-g23ee8af

Output:

ls -l /usr/local/bin/gcc*
lrwxr-xr-x  1 dir_support  admin  31 Oct 12 14:37 /usr/local/bin/gcc-13 -> ../Cellar/gcc/13.2.0/bin/gcc-13
lrwxr-xr-x  1 dir_support  admin  34 Oct 12 14:37 /usr/local/bin/gcc-ar-13 -> ../Cellar/gcc/13.2.0/bin/gcc-ar-13
lrwxr-xr-x  1 dir_support  admin  34 Oct 12 14:37 /usr/local/bin/gcc-nm-13 -> ../Cellar/gcc/13.2.0/bin/gcc-nm-13
lrwxr-xr-x  1 dir_support  admin  38 Oct 12 14:37 /usr/local/bin/gcc-ranlib-13 -> ../Cellar/gcc/13.2.0/bin/gcc-ranlib-13

Hello @radchat,

Would you please try reinstalling the CommandLineTools, before trying the build again? First run:

xcode-select -p

and verify that it shows the output: /Library/Developer/CommandLineTools
If so, remove that directory tree, and reinstall:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

Please let us know how that goes. If it goes well, you can try building AFNI again:

build_afni.py -build_root ~/afni_build -package  macos_12_x86_64

Thanks,

  • rick

Hi @rickr,

Thanks for your help. I didn't see this earlier and just tried this now. I've been using the precompiled binaries that you installed last week and it's working well so far, but I am sure something will be outdated eventually.

I was able to successfully re-install the CommandLineTools, but I still got the following error when trying to build AFNI again:

** error: failed run_cmd: make AFNI_WHOMADEIT=build itall >& log_make.txt
-- status: building FAILURE
   see 'make' log file /Users/chatterjeer4/afni_build/build_src/log_make.txt
** error: tail from log_make.txt:
   --------------------------------------------------
   /usr/local/bin/gcc-13 -O2 -DDARWIN -m64 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DDONT_USE_MCW_MALLOC  -c afni_whelp.c -I. -I/usr/local/include -I/opt/X11/include -I/usr/local/include/netpbm -I/usr/include -Icoxplot -Inifti/nifti2 -Inifti/niftilib -Inifti/nifticdf -Inifti/znzlib -I3DEdge/src -Irickr -Ileej3 -DHAVE_ZLIB -DHAVE_GIFTI  -If2c
   (cd leej3; \
   /usr/local/bin/gcc-13 -O2 -DDARWIN -m64 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DDONT_USE_MCW_MALLOC  -c whats_my_exepath.c; \
   /bin/cp -f whats_my_exepath.o ..; \
   cd ..)
   /bin/rm -f afni
   /usr/local/bin/gcc-13 -O2 -DDARWIN -m64 -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE -DDONT_USE_MCW_MALLOC  -DWHATS_MY_EXEPATH -o afni afni.o afni_func.o afni_widg.o afni_warp.o afni_fimmer.o afni_slice_short.o afni_slice_float.o afni_filer.o afni_slice_byte.o  afni_slice_complex.o afni_pcor.o afni_pcor_float.o afni_transforms.o pbar.o afni_graph.o afni_plugin.o afni_cluster.o parser.o parser_int.o afni_plugout.o afni_fimfunc.o afni_setup.o afni_receive.o mcw_graf.o afni_splash.o afni_pplug_env.o afni_pplug_2dfunc.o afni_friends.o afni_ttren.o afni_pplug_1dfunc.o afni_driver.o afni_niml.o afni_sumafunc.o afni_slice_rgbyte.o afni_version.o afni_lock.o afni_vol2surf.o afni_pplug_instacorr.o afni_pplug_instacalc.o afni_pplug_tstat.o afni_whelp.o whats_my_exepath.o  -m64 -dynamic -L. -L/usr/local/lib -L/opt/X11/lib -L/usr/local/lib -Wl,-x -Wl,-multiply_defined -Wl,warning -Wl,-bind_at_load  -lmrix -lcoxplot -lmri  libXmHTML.a libjpeg.a -lmri -lf2c -lXm -ljpeg -lXt -lXft -lfontconfig -lpng16 -liconv -lXmu -lXp -lXpm -lXext -lX11 -lz -lexpat  -lm -lc -lm -lc
   ld: file not found: libjpeg.a
   collect2: error: ld returned 1 exit status
   make: *** [afni] Error 1
   ---------------------------

Thanks again! Appreciate it.

Best,
Radhika

Those binaries have been updated in the distribution, so in the future you should be able to update them via:

@update.afni.binaries -d

Maybe later we can look at compiling locally again. It would be good to figure this issue out.

Thanks,

  • rick

Hi Rick,
Oh, awesome. Yes, I agree, once I start using AFNI regularly I may want to compile it locally. I'll let you know.

Thanks! I appreciate all your help!

Best,
Radhika