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

Can't compile on Ubuntu 9.10 64b REE 1.8.7 because of tarruby - any ideas? #1

Closed
aemadrid opened this issue Mar 8, 2010 · 8 comments
Labels

Comments

@aemadrid
Copy link

aemadrid commented Mar 8, 2010

Get errors when trying to compile tarruby. Googled but found nothing about it.

/home/aemadrid/ruby/ee-1.8.7-2010.01/bin/ruby extconf.rb
checking for epkg... no
checking for mkencap... no
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking for strlcpy... no
checking for strsep... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for AIX... no
checking for an ANSI C-conforming const... yes
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 for unistd.h... (cached) yes
checking whether sys/types.h defines makedev... yes
checking for major_t... no
checking for minor_t... no
checking for dev_t... yes
checking for socklen_t... yes
checking for uint64_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for nlink_t... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for working basename... no
checking for libgen.h... (cached) yes
checking for working dirname... no
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for working POSIX fnmatch... yes
checking for lchown... yes
checking whether makedev expects three arguments... no
checking for working snprintf... yes
checking for strdup... yes
checking for strftime... yes
checking for strlcpy... (cached) no
checking for strmode... no
checking for strsep... (cached) yes
checking for gzread in -lz... yes
configure: creating ./config.status
config.status: creating listhash/libtar_listhash.h
config.status: creating listhash/libtar_list.c
config.status: creating listhash/libtar_hash.c
config.status: creating listhash/libtar_list_new.3
config.status: creating listhash/libtar_hash_new.3
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating libtar/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
for n in lib libtar doc; do
( cd $n && make all ) || exit 1;
done
make[1]: Entering directory /home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/lib' gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o append.o append.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o block.o block.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o decode.o decode.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o encode.o encode.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o extract.o extract.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o handle.o handle.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o libtar_hash.o ../listhash/libtar_hash.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o libtar_list.o ../listhash/libtar_list.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o output.o output.c output.c: In function ‘th_print_long_ls’: output.c:129: warning: incompatible implicit declaration of built-in function ‘free’ gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o util.o util.c util.c: In function ‘int_to_oct_nonull’: util.c:153: warning: field width should have type ‘int’, but argument 4 has type ‘size_t’ util.c:153: warning: field width should have type ‘int’, but argument 4 has type ‘size_t’ gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o wrapper.o wrapper.c wrapper.c: In function ‘tar_extract_glob’: wrapper.c:37: warning: incompatible implicit declaration of built-in function ‘free’ wrapper.c:49: warning: incompatible implicit declaration of built-in function ‘free’ wrapper.c:52: warning: incompatible implicit declaration of built-in function ‘free’ wrapper.c: In function ‘tar_extract_all’: wrapper.c:88: warning: incompatible implicit declaration of built-in function ‘free’ wrapper.c:91: warning: incompatible implicit declaration of built-in function ‘free’ gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o strlcpy.o ../compat/strlcpy.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o basename.o ../compat/basename.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o dirname.o ../compat/dirname.c gcc -g -O2 -I. -I.. -I. -I../compat -I../listhash -c -o strmode.o ../compat/strmode.c ar rc libtar.a append.o block.o decode.o encode.o extract.o handle.o libtar_hash.o libtar_list.o output.o util.o wrapper.o strlcpy.o basename.o dirname.o strlcpy.o strmode.o ranlib libtar.a make[1]: Leaving directory/home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/lib'
make[1]: Entering directory /home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/libtar' gcc -g -O2 -I.. -I../lib -I../listhash -I../lib -I../compat -c -o libtar.o libtar.c libtar.c: In function ‘gzopen_frontend’: libtar.c:94: warning: cast from pointer to integer of different size libtar.c: In function ‘usage’: libtar.c:271: warning: incompatible implicit declaration of built-in function ‘exit’ gcc -g -O2 -o libtar libtar.o ../lib/libtar.a -lz make[1]: Leaving directory/home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/libtar'
make[1]: Entering directory /home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/doc' make[1]: Nothing to be done forall'.
make[1]: Leaving directory `/home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/gems/1.8/gems/tarruby-0.1.5/ext/libtar/doc'
checking for zlib.h... yes
checking for main() in -lz... yes
checking for bzlib.h... yes
checking for main() in -lbz2... yes
creating Makefile

make
gcc -I. -I. -I/home/aemadrid/ruby/ee-1.8.7-2010.01/lib/ruby/1.8/x86_64-linux -I. -DHAVE_ZLIB_H -DHAVE_BZLIB_H -Ilibtar/lib -Ilibtar/listhash -fPIC -g -O2 -c tarruby.c
tarruby.c: In function ‘gzopen_frontend’:
tarruby.c:92: warning: cast from pointer to integer of different size
tarruby.c: In function ‘bzopen_frontend’:
tarruby.c:146: warning: cast from pointer to integer of different size
gcc -shared -o tarruby.so tarruby.o libtar/lib/libtar.a -L. -L/home/aemadrid/ruby/ee-1.8.7-2010.01/lib -Wl,-R/home/aemadrid/ruby/ee-1.8.7-2010.01/lib -L. -rdynamic -Wl,-export-dynamic -lbz2 -lz -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: libtar/lib/libtar.a(append.o): relocation R_X86_64_32 against `dev_match' can not be used when making a shared object; recompile with -fPIC
libtar/lib/libtar.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [tarruby.so] Error 1

@mitchellh
Copy link
Contributor

Tarruby appeared to be the only library out there that could tar/untar files. I'm looking into this now. Another option is to attempt to use the tar system call and fall back to tarruby if it doesn't work (removing tarruby as a dependency).

I'm looking at the options available now.

@aemadrid
Copy link
Author

aemadrid commented Mar 9, 2010

Thanks!

@mitchellh
Copy link
Contributor

An update once more. I believe John will be working on getting this integrated. We're going to go ahead with what I said earlier:

Vagrant will first try to use the tar system command. If it doesn't exist or fails, it will fall back on trying to use tarruby. This will remove tarruby from the list of required gem dependencies, which hopefully will get this running on your system, assuming it has tar ;)

We'll keep you posted.

@KieranP
Copy link

KieranP commented Mar 9, 2010

It looks like a contributor has made a switch from tarruby to archive-tar-minitar

Their reason:
Tarruby seems to not compile on 64-bit, and even its author says to use another library. Minitar seems to be more active than libarchive so I used that.

http://github.com/ilkka/vagrant/commits/

So from what I see, the issues tarruby has on 64bit machines is the cause of this issue.

@mitchellh
Copy link
Contributor

Kieran,

Yep! Working on merging this in now. I need to add tests and it didn't quite work for additional files,but I've got it working now. Just testing.

@aemadrid
Copy link
Author

aemadrid commented Mar 9, 2010

Thanks for the update and the hard work. I'll check it out as soon as you have it merged.

@mitchellh
Copy link
Contributor

aemadrid,

This should be fixed. I pushed the gem as prerelease for now. You can test it by doing a sudo gem install vagrant --pre. Other users with this issue in IRC have had success :)

Closing this issue.

@aemadrid
Copy link
Author

aemadrid commented Mar 9, 2010

That did it! thanks.

mitchellh added a commit that referenced this issue Dec 31, 2011
mitchellh pushed a commit that referenced this issue Oct 15, 2013
Update boundary usage in the sed regexp to update the hosts file
sethvargo pushed a commit that referenced this issue May 30, 2015
sethvargo pushed a commit that referenced this issue May 30, 2015
Removed useless line in TinyCore change_host_name.
mitchellh pushed a commit that referenced this issue Jul 17, 2015
briancain pushed a commit that referenced this issue Aug 6, 2019
soapy1 pushed a commit that referenced this issue Mar 24, 2020
Test rmi functionality for docker provider
@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants