Git Product home page Git Product logo

Comments (9)

tschoonj avatar tschoonj commented on July 21, 2024

Hi David, good to hear from you!

I am not sure how you ran into that: looking at the code, this is only possible if the SWIG pre-processor macro is defined. Could you attach the config.log file please? Thanks

from xraylib.

DavidSagan avatar DavidSagan commented on July 21, 2024

And good to know that xraylib is alive and well. I use it all the time! -- Cheers, David

config.log

from xraylib.

tschoonj avatar tschoonj commented on July 21, 2024

Not seeing anything unusual in there at first glance.

Could you re-run your build with make V=1? This should show the full compiler invocations.

Do you have a CFLAGS or CPPFLAGS environment variable set?

from xraylib.

DavidSagan avatar DavidSagan commented on July 21, 2024

I don't have these flags set.

MAC:~/Bmad/xraylib> make V=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in include
make[2]: Nothing to be done for `all'.
Making all in src
/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include -I..    -Werror=deprecated -Werror=deprecated-declarations -Werror=implicit -Werror=unused-function -Werror=parentheses -Werror=unused-result -g -O2 -MT libprdata_la-xrayfiles.lo -MD -MP -MF .deps/libprdata_la-xrayfiles.Tpo -c -o libprdata_la-xrayfiles.lo `test -f 'xrayfiles.c' || echo './'`xrayfiles.c
libtool: compile:  /opt/local/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I.. -Werror=deprecated -Werror=deprecated-declarations -Werror=implicit -Werror=unused-function -Werror=parentheses -Werror=unused-result -g -O2 -MT libprdata_la-xrayfiles.lo -MD -MP -MF .deps/libprdata_la-xrayfiles.Tpo -c xrayfiles.c  -fno-common -DPIC -o .libs/libprdata_la-xrayfiles.o
xrayfiles.c: In function 'XRayInitFromPath':
xrayfiles.c:59:45: error: implicit declaration of function 'xrl_strdup'; did you mean 'strdup'? [-Werror=implicit-function-declaration]
   59 |                 MendelArraySorted[i].name = xrl_strdup(MendelArray[i].name);
      |                                             ^~~~~~~~~~
      |                                             strdup
xrayfiles.c:59:43: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   59 |                 MendelArraySorted[i].name = xrl_strdup(MendelArray[i].name);
      |                                           ^
xrayfiles.c:301:32: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  301 |                 error_lines[0] = xrl_strdup(line_name);
      |                                ^
xrayfiles.c:314:53: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  314 |                         error_lines[nerror_lines-1] = xrl_strdup(line_name);
      |                                                     ^
xrayfiles.c:350:32: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  350 |                 error_lines[0] = xrl_strdup(shell_name);
      |                                ^
xrayfiles.c:363:53: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  363 |                         error_lines[nerror_lines-1] = xrl_strdup(shell_name);
      |                                                     ^
xrayfiles.c:461:32: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  461 |                 error_lines[0] = xrl_strdup(line_name);
      |                                ^
xrayfiles.c:474:53: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  474 |                         error_lines[nerror_lines-1] = xrl_strdup(line_name);
      |                                                     ^
xrayfiles.c:517:32: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  517 |                 error_lines[0] = xrl_strdup(auger_name);
      |                                ^
xrayfiles.c:530:53: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  530 |                         error_lines[nerror_lines-1] = xrl_strdup(auger_name);
      |                                                     ^
cc1: some warnings being treated as errors
make[2]: *** [libprdata_la-xrayfiles.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

from xraylib.

tschoonj avatar tschoonj commented on July 21, 2024

I am unable to reproduce this, sorry.

If you remove #ifndef SWIG and one of the #endifs in include/xraylib-aux.h, does compilation succeed then?

from xraylib.

DavidSagan avatar DavidSagan commented on July 21, 2024

No change with #ifndef SWIG removed.

from xraylib.

DavidSagan avatar DavidSagan commented on July 21, 2024

Note: This is a recent issue for Mac since in the past I have not had a problem. I am using OS 14.1.2 with Xcode 15.0.1.

from xraylib.

DavidSagan avatar DavidSagan commented on July 21, 2024

If I remove the #ifndef _XRAYLIB_AUX_H the compile gets further.

from xraylib.

tschoonj avatar tschoonj commented on July 21, 2024

I have been unable to reproduce this. AFAICT this looks like an issue with the preprocessor. Does switching to a different version of GCC (or LLVM/clang) make a difference?

from xraylib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.