Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/ttyrec.c fails to compile. #32

Open
ghost opened this issue May 9, 2014 · 10 comments
Open

ext/ttyrec.c fails to compile. #32

ghost opened this issue May 9, 2014 · 10 comments

Comments

@ghost
Copy link

ghost commented May 9, 2014

Output:

ERROR:  Error installing showterm:
        ERROR: Failed to build gem native extension.

make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

make "DESTDIR="
gcc -O2 -c ttyrec.c
ttyrec.c: In function 'finish':
ttyrec.c:209:13: error: storage size of 'status' isn't known
*** Error code 1

Stop.

Platform: FreeBSD 10.0 amd64; YARV 2.1.2; GCC 4.7.3.

@deepbluesea
Copy link

make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

make "DESTDIR="
gcc -O2 -c -o ttyrec.o ttyrec.c
ttyrec.c:47:21: fatal error: termios.h: No such file or directory
compilation terminated.
make: *** [ttyrec.o] Error 1

make failed, exit code 2
EDIT: Platform: Windows 8.1

@ConradIrwin
Copy link
Owner

What platform are you on?

On Thursday, January 29, 2015, deepbluesea [email protected] wrote:

make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

make "DESTDIR="
gcc -O2 -c -o ttyrec.o ttyrec.c
ttyrec.c:47:21: fatal error: termios.h: No such file or directory
compilation terminated.
make: *** [ttyrec.o] Error 1

make failed, exit code 2


Reply to this email directly or view it on GitHub
#32 (comment).

@j1z0
Copy link

j1z0 commented Oct 6, 2016

on OS-X 10.11.6 running zsh:

Building native extensions. This could take a while...
Successfully installed showterm-0.5.0
Parsing documentation for showterm-0.5.0
unable to convert "\xB6" from ASCII-8BIT to UTF-8 for ext/ttyrec.c, skipping
Done installing documentation for showterm after 0 seconds
1 gem installed
gem install showterm 0.80s user 0.20s system 49% cpu 2.024 total

but since it skips the ttyrec.c on first run you get:

showterm recording. (Exit shell when done.)
/usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/ext/ttyrec: /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/ext/ttyrec: cannot execute binary file
/usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/lib/showterm.rb:172:in convert': Invalid ttyrecord: "" (RuntimeError) from /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/lib/showterm.rb:158:inrecord_with_ttyrec'
from /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/lib/showterm.rb:20:in record!' from /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/bin/showterm:37:inrecord'
from /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/bin/showterm:29:in run' from /usr/local/lib/ruby/gems/2.3.0/gems/showterm-0.5.0/bin/showterm:156:in<top (required)>'
from /usr/local/bin/showterm:23:in load' from /usr/local/bin/showterm:23:in

'

@curtisstpierre
Copy link

curtisstpierre commented Nov 16, 2016

Similar issue on ubuntu 16.10

make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

make "DESTDIR="
gcc -O2   -c -o ttyrec.o ttyrec.c
ttyrec.c: In function ‘finish’:
ttyrec.c:209:13: error: storage size of ‘status’ isn’t known
  union wait status;
             ^~~~~~
ttyrec.c: In function ‘doshell’:
ttyrec.c:328:3: warning: missing sentinel in function call [-Wformat=]
   execl(shell, strrchr(shell, '/') + 1, "-i", 0);
   ^~~~~
ttyrec.c:330:3: warning: missing sentinel in function call [-Wformat=]
   execl(shell, strrchr(shell, '/') + 1, "-c", command, 0);
   ^~~~~
ttyrec.c: In function ‘doinput’:
ttyrec.c:197:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void) write(master, ibuf, cc);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ttyrec.c: In function ‘dooutput’:
ttyrec.c:300:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void) write(1, obuf, cc);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'ttyrec.o' failed
make: *** [ttyrec.o] Error 1

make failed, exit code 2

@pawaanv
Copy link

pawaanv commented Jan 16, 2017

similar error on Korora release 25 (Gurgle)
Building native extensions. This could take a while...
ERROR: Error installing showterm:
ERROR: Failed to build gem native extension.

current directory: /usr/local/share/gems/gems/showterm-0.5.0/ext

/usr/bin/ruby -r ./siteconf20170116-4522-1jl34ho.rb extconf.rb

current directory: /usr/local/share/gems/gems/showterm-0.5.0/ext
make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

current directory: /usr/local/share/gems/gems/showterm-0.5.0/ext
make "DESTDIR="
gcc -O2 -c -o ttyrec.o ttyrec.c
ttyrec.c: In function ‘finish’:
ttyrec.c:209:13: error: storage size of ‘status’ isn’t known
union wait status;
^~~~~~
: recipe for target 'ttyrec.o' failed
make: *** [ttyrec.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/share/gems/gems/showterm-0.5.0 for inspection.
Results logged to /usr/local/lib64/gems/ruby/showterm-0.5.0/gem_make.out

@nponeccop
Copy link

Same error on Archlinux. I think gcc -v is the only relevant detail about my system. Basically, gcc 7.2.0 on i686:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/7.2.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.0 (GCC)

The build log:

make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

current directory: /tmp/foo/aur-showterm/pkg/showterm/usr/lib/ruby/gems/2.4.0/gems/showterm-0.5.0/ext
make "DESTDIR="
gcc -O2 -D_FORTIFY_SOURCE=2  -c -o ttyrec.o ttyrec.c
ttyrec.c: In function ‘finish’:
ttyrec.c:209:13: error: storage size of ‘status’ isn’t known
  union wait status;
             ^~~~~~
ttyrec.c: In function ‘doinput’:
ttyrec.c:197:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void) write(master, ibuf, cc);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ttyrec.c: In function ‘dooutput’:
ttyrec.c:300:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   (void) write(1, obuf, cc);
   ^~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [<builtin>: ttyrec.o] Error 1

make failed, exit code 2

@fmv1992
Copy link

fmv1992 commented Dec 16, 2017

Same as @nponeccop.

@thapakazi
Copy link

is this project abandoned, same-same like @nponeccop

@ConradIrwin
Copy link
Owner

I've been using it, but only on mac osx recently — does anyone have an updated copy of ttyrec.c it's probably just a case of updating the dependency.

@cbcoutinho
Copy link

I am having the same issue on OpenSUSE Tumbleweed (rolling release) installing ttyrec.c with ruby 2.5.0 and gcc 7.3.0. Here's my output when trying to install showterm:

$ gem install --user showterm
Building native extensions. This could take a while...
ERROR:  Error installing showterm:
	ERROR: Failed to build gem native extension.

    current directory: /home/chris/.gem/ruby/2.5.0/gems/showterm-0.5.0/ext
/usr/bin/ruby.ruby2.5 -r ./siteconf20180225-16216-1vfwg7t.rb extconf.rb

current directory: /home/chris/.gem/ruby/2.5.0/gems/showterm-0.5.0/ext
make "DESTDIR=" clean
rm -f *.o ttyrec ttyplay ttytime ttyrecord *~

current directory: /home/chris/.gem/ruby/2.5.0/gems/showterm-0.5.0/ext
make "DESTDIR="
gcc -O2   -c -o ttyrec.o ttyrec.c
gcc -O2   -c -o io.o io.c
gcc -O2   -c -o ttyplay.o ttyplay.c
gcc -O2   -c -o ttytime.o ttytime.c
ttytime.c: In function ‘main’:
ttytime.c:64:5: warning: implicit declaration of function ‘set_progname’ [-Wimplicit-function-declaration]
     set_progname(argv[0]);
     ^~~~~~~~~~~~
ttyrec.c: In function ‘finish’:
ttyrec.c:209:13: error: storage size of ‘status’ isn’t known
  union wait status;
             ^~~~~~
make: *** [<builtin>: ttyrec.o] Error 1
make: *** Waiting for unfinished jobs....
ttyplay.c: In function ‘main’:
ttyplay.c:271:5: warning: implicit declaration of function ‘set_progname’; did you mean ‘sethostname’? [-Wimplicit-function-declaration]
     set_progname(argv[0]);
     ^~~~~~~~~~~~
     sethostname

make failed, exit code 2

Gem files will remain installed in /home/chris/.gem/ruby/2.5.0/gems/showterm-0.5.0 for inspection.
Results logged to /home/chris/.gem/ruby/2.5.0/extensions/x86_64-linux/2.5.0/showterm-0.5.0/gem_make.out

And my gem environment:

$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.3
  - RUBY VERSION: 2.5.0 (2017-12-25 patchlevel 0) [x86_64-linux-gnu]
  - INSTALLATION DIRECTORY: /usr/lib64/ruby/gems/2.5.0
  - USER INSTALLATION DIRECTORY: /home/chris/.gem/ruby/2.5.0
  - RUBY EXECUTABLE: /usr/bin/ruby.ruby2.5
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /home/chris/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib64/ruby/gems/2.5.0
     - /home/chris/.gem/ruby/2.5.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => true
     - :bulk_threshold => 1000
     - :benchmark => false
     - :install => "--format-executable --no-user-install"
     - "install" => "--format-executable --no-user-install"
     - :format_executable => true
     - :update => "--format-executable --no-user-install"
     - "update" => "--format-executable --no-user-install"
     - :sources => ["https://rubygems.org"]
  - REMOTE SOURCES:
     - https://rubygems.org
  - SHELL PATH:
     - /home/chris/Software/nvm/versions/node/v8.9.3/bin
     - /home/chris/.go/bin
     - /home/chris/Software/Salome/appli_V8_2_0
     - /opt/mssql-tools/bin
     - /usr/local/cuda/bin
     - /home/chris/Software/hdf5/install/bin
     - /home/chris/Software/dakota/install/bin
     - /home/chris/Software/dakota/install/test
     - /home/chris/.cabal/bin
     - /home/chris/.gem/ruby/2.5.0/bin
     - /home/chris/.cargo/bin
     - /usr/sbin
     - /sbin
     - /home/chris/bin
     - /home/chris/.local/bin
     - /home/chris/.local/bin
     - /home/chris/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/lib/mit/sbin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants