Giter Site home page Giter Site logo

twclone's People

Contributors

rdearman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

twclone's Issues

Compilation Issue - GCC 12.2.1 - Fedora 37 - error: conflicting types for ‘getopt’

I am attempting to compile the code under GCC 12.2.1 on Fedora 37, but I am running into an issue.

Just as the instructions suggested, I ran ./configure followed by make. Here is the output from ./configure

(base) [anthony@fedora twclone]$ ./configure
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... (cached) mawk
checking whether make sets ${MAKE}... (cached) yes
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for style of include used by make... GNU
checking dependency style of gcc... (cached) gcc3
checking for pow in -lm... (cached) yes
checking for pthread_create in -lpthread... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for ctype.h... (cached) yes
checking for errno.h... (cached) yes
checking for math.h... (cached) yes
checking for netdb.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for pthread.h... (cached) yes
checking for stdio.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/ipc.h... (cached) yes
checking for sys/msg.h... (cached) yes
checking for sys/poll.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for termios.h... (cached) yes
checking for time.h... (cached) yes
checking for unistd.h... (cached) yes
creating ./config.status
creating Makefile
creating autoconf.h
autoconf.h is unchanged

Then here is the output from ./make with the 'getopt' related issue.

(base) [anthony@fedora twclone]$ make
make  all-am
make[1]: Entering directory '/home/anthony/Projects/twclone'
source='bigbang.c' object='bigbang.o' libtool=no \
depfile='.deps/bigbang.Po' tmpdepfile='.deps/bigbang.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c `test -f bigbang.c || echo './'`bigbang.c
In file included from bigbang.c:51:
./getopt.h:25:5: error: conflicting types for ‘getopt’; have ‘int(int,  char ** const,  const char *)’
   25 | int getopt (int, char **const, const char *);
      |     ^~~~~~
In file included from /usr/include/bits/getopt_posix.h:27,
                 from /usr/include/unistd.h:903,
                 from bigbang.c:50:
/usr/include/bits/getopt_core.h:91:12: note: previous declaration of ‘getopt’ with type ‘int(int,  char * const*, const char *)’
   91 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
      |            ^~~~~~
make[1]: *** [Makefile:369: bigbang.o] Error 1
make[1]: Leaving directory '/home/anthony/Projects/twclone'
make: *** [Makefile:255: all] Error 2

Do you happen to have any ideas on how to get around this?

It appears there is a custom version of getopt (getopt.h, getopt.c) that is used with bigbang.c for universe generation. Is this custom version of getopt necessary when running with a modern version of c? If not, what is the easiest way to disable it?

Compilation Issue - GCC 12.2.1 - Fedora 37 - make: *** No rule to make target 'configure.ac', needed by 'Makefile.in'. Stop.

Rick,

When I attempt to run any of the make commands, I now get the following issue.

(base) [anthony@fedora twclone]$ make
make: *** No rule to make target 'configure.ac', needed by 'Makefile.in'.  Stop.

Here is the output from my execution of ./configure. I am not sure if anything has changed.

(base) [anthony@fedora twclone]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/anthony/Projects/twclone/missing: Unknown `--is-lightweight' option
Try `/home/anthony/Projects/twclone/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for pow in -lm... yes
checking for pthread_create in -lpthread... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting
config.status: creating autoconf.h
config.status: autoconf.h is unchanged
config.status: executing depfiles commands
(base) [anthony@fedora twclone]$ 

Thank you for much for your helping me try to get this code compiled!

FYI, I expect GCC on Fedora should operate similarly to your install on Linux Mint. I imagine whatever issues remain are probably minor. I am just not sure how to resolve them.

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.