[MacPorts] #44550: crystfel @0.5.3a: error: variable has incomplete type 'struct termios'
#44550: crystfel @0.5.3a: error: variable has incomplete type 'struct termios' --------------------------+----------------------- Reporter: ryandesign@… | Owner: rkirian@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Keywords: | Port: crystfel --------------------------+----------------------- crystfel @0.5.3a failed to build for me on my OS X 10.7 test machine. {{{ :info:build libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/Volumes/Data/macports/lion/share\" -I../lib -Wall -I../lib -pipe -Os -arch x86_64 -I/Volumes/Data/macports/lion/include -I/Volumes/Data/macports/lion/include -I/Volumes/Data/macports/lion/include -pipe -Os -arch x86_64 -MT src/dirax.lo -MD -MP -MF src/.deps/dirax.Tpo -c src/dirax.c -fno-common -DPIC -o src/.libs/dirax.o :info:build src/dirax.c:540:15: warning: implicit declaration of function 'forkpty' is invalid in C99 [-Wimplicit-function-declaration] :info:build dirax->pid = forkpty(&dirax->pty, NULL, NULL, NULL); :info:build ^ :info:build src/dirax.c:548:18: error: variable has incomplete type 'struct termios' :info:build struct termios t; :info:build ^ :info:build src/dirax.c:548:10: note: forward declaration of 'struct termios' :info:build struct termios t; :info:build ^ :info:build src/dirax.c:551:3: warning: implicit declaration of function 'tcgetattr' is invalid in C99 [-Wimplicit-function-declaration] :info:build tcgetattr(STDIN_FILENO, &t); :info:build ^ :info:build src/dirax.c:552:18: error: use of undeclared identifier 'ECHO' :info:build t.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); :info:build ^ :info:build src/dirax.c:552:25: error: use of undeclared identifier 'ECHOE' :info:build t.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); :info:build ^ :info:build src/dirax.c:552:33: error: use of undeclared identifier 'ECHOK' :info:build t.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); :info:build ^ :info:build src/dirax.c:552:41: error: use of undeclared identifier 'ECHONL' :info:build t.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); :info:build ^ :info:build src/dirax.c:553:3: warning: implicit declaration of function 'tcsetattr' is invalid in C99 [-Wimplicit-function-declaration] :info:build tcsetattr(STDIN_FILENO, TCSANOW, &t); :info:build ^ :info:build src/dirax.c:553:27: error: use of undeclared identifier 'TCSANOW' :info:build tcsetattr(STDIN_FILENO, TCSANOW, &t); :info:build ^ :info:build 3 warnings and 6 errors generated. }}} Some info about this machine: {{{ $ sw_vers ProductName: Mac OS X ProductVersion: 10.7.5 BuildVersion: 11G63 }}} {{{ $ xcodebuild -version Xcode 4.3.3 Build version 4E3002 }}} {{{ $ clang -v Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix }}} It built fine on my OS X 10.8 test machine. -- Ticket URL: <https://trac.macports.org/ticket/44550> MacPorts <http://www.macports.org/> Ports system for OS X
#44550: crystfel @0.5.3a: error: variable has incomplete type 'struct termios' ---------------------------+----------------------- Reporter: ryandesign@… | Owner: rkirian@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: crystfel | ---------------------------+----------------------- Comment (by rkirian@…): I've attached a new port file and two patches. It would be great if you could try each of the patches (only patch 1 works on my machine running OS 10.9.4; unfortunately, I don't have a machine running OS 10.7). Here is some more info from the main developer of CrystFEL (Thomas White): The termios stuff comes from `pty.h` on a GNU/Linux system and `util.h` on a BSD-style one (like OSX). There's a check for which one to use in `configure.ac`, but I guess it breaks on OSX 10.7. To debug this, we need to know exactly which combination of headers and libraries to use. Therefore, try replacing these lines in `libcrystfel/src/dirax.c`: {{{ #if HAVE_FORKPTY_LINUX #include <pty.h> #elif HAVE_FORKPTY_BSD #include <util.h> #endif }}} to just this: {{{ #include <pty.h> }}} and see if it works. Then try just this: {{{ #include <util.h> }}} Additionally, it'd be useful to see the `config.h` file to see what result the test actually gave. -- Ticket URL: <https://trac.macports.org/ticket/44550#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#44550: crystfel @0.5.3a: error: variable has incomplete type 'struct termios' ---------------------------+----------------------- Reporter: ryandesign@… | Owner: rkirian@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: crystfel | ---------------------------+----------------------- Comment (by ryandesign@…): I haven't tried your patches yet, but I've attached the config.h and config.log as well. When supplying changes to a Portfile, you should submit a unified diff, not a complete new Portfile, so that we can more easily see your changes, and so that other unrelated changes that may have been made in the repository in the mean time don't inadvertently get lost. -- Ticket URL: <https://trac.macports.org/ticket/44550#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44550: crystfel @0.5.3a: error: variable has incomplete type 'struct termios' ---------------------------+----------------------- Reporter: ryandesign@… | Owner: rkirian@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: crystfel | ---------------------------+----------------------- Comment (by rkirian@…): Replying to [comment:2 ryandesign@…]:
When supplying changes to a Portfile, you should submit a unified diff, not a complete new Portfile...
Thanks for your patience - I have attached a unified diff. -- Ticket URL: <https://trac.macports.org/ticket/44550#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts