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

boehm_gc fails to build on Cygwin #7336

Closed
mwhansen opened this issue Oct 28, 2009 · 11 comments
Closed

boehm_gc fails to build on Cygwin #7336

mwhansen opened this issue Oct 28, 2009 · 11 comments

Comments

@mwhansen
Copy link
Contributor

It fails with

  /bin/sh ./libtool --tag=CC --mode=link gcc -fexceptions -I libatomic_ops/src -g -O2   -o libcord.la -rpath /home/mhansen/sage-4.2/local/lib -version-info 1:3:0 -no-undefined cord/cordbscs.lo cord/cordprnt.lo cord/cordtest.lo cord/cordxtra.lo ./libgc.la 

  *** Warning: This system can not link to static lib archive ./libgc.la.
  *** I have the capability to make that library automatically link in when
  *** you link to this library.  But I can only do this if you have a
  *** shared version of the library, which you do not appear to have.
  rm -fr  .libs/libcord.dll.a
  gcc -shared  cord/.libs/cordbscs.o cord/.libs/cordprnt.o cord/.libs/cordtest.o cord/.libs/cordxtra.o   -o .libs/cygcord-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libcord.dll.a
  Creating library file: .libs/libcord.dll.a
  cord/.libs/cordbscs.o: In function `CORD_from_fn':
  /home/mhansen/sage-4.2/spkg/build/boehm_gc-7.1.p2/src/cord/cordbscs.c:288: undefined reference to `_GC_malloc_atomic'
  /home/mhansen/sage-4.2/spkg/build/boehm_gc-7.1.p2/src/cord/cordbscs.c:298: undefined reference to `_GC_malloc'
  cord/.libs/cordbscs.o: In function `CORD_substr_closure':
  /home/mhansen/sage-4.2/spkg/build/boehm_gc-7.1.p2/src/cord/cordbscs.c:344: undefined reference to `_GC_malloc'

This can be fixed by setting THREADDLLIBS to be empty.

I'll post an updated spkg here shortly.

CC: @williamstein

Component: porting: Cygwin

Author: Mike Hansen

Reviewer: Minh Van Nguyen

Merged: sage-4.3.3.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/7336

@mwhansen
Copy link
Contributor Author

mwhansen commented Nov 6, 2009

comment:1

The spkg with the above change (active only when $UNAME = "CYGWIN") can be found at http://sage.math.washington.edu/home/mhansen/boehm_gc-7.1.p3.spkg .

@mwhansen
Copy link
Contributor Author

mwhansen commented Nov 6, 2009

Author: Mike Hansen

@williamstein
Copy link
Contributor

comment:2

Mike, I was trying to referee this, but the spkg is missing. Did you delete it? Can you repost it somewhere?

@mwhansen
Copy link
Contributor Author

mwhansen commented Feb 7, 2010

comment:3

It should be up now.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 15, 2010

comment:5

An updated spkg is available at

http://sage.math.washington.edu/home/mvngu/spkg/standard/boehm/boehm_gc-7.1.p4.spkg

This includes Mike's changes at http://sage.math.washington.edu/home/mhansen/boehm_gc-7.1.p3.spkg, but based on the boehm_gc spkg in Sage 4.3.3.alpha0.

@sagetrac-mvngu sagetrac-mvngu mannequin added this to the sage-4.3.3 milestone Feb 15, 2010
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 16, 2010

Reviewer: Minh Van Nguyen

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 16, 2010

comment:6

I rebased Mike's spkg, reviewed it, built it on Cygwin (winxp1 on boxen.math). The build went fine.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 16, 2010

Merged: sage-4.3.3.alpha1

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 16, 2010

comment:7

Merged in the standard spkg repository.

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Feb 16, 2010
@williamstein
Copy link
Contributor

comment:8

I just tried this spkg on cygwin and it fails:


deps/cordxtra.Tpo -c cord/cordxtra.c -o cord/cordxtra.o >/dev/null 2>&1

/bin/sh ./libtool --tag=CC --mode=link gcc -fexceptions -I libatomic_ops/src -g -O2   -o libcord.la -rpath /home/wstein/sage-4.4.3.alpha0/local/lib -version-info !1:3:0 -no-undefined cord/cordbscs.lo cord/cordprnt.lo cord/cordtest.lo cord/cordxtra.lo ./libgc.la 

*** Warning: This system can not link to static lib archive ./libgc.la.

*** I have the capability to make that library automatically link in when

*** you link to this library.  But I can only do this if you have a

*** shared version of the library, which you do not appear to have.

gcc -shared  cord/.libs/cordbscs.o cord/.libs/cordprnt.o cord/.libs/cordtest.o cord/.libs/cordxtra.o   -o .libs/cygcord-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libcord.dll.a

Creating library file: .libs/libcord.dll.acord/.libs/cordbscs.o: In function `CORD_from_fn':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:288: undefined reference to `_GC_malloc_atomic'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:298: undefined reference to `_GC_malloc'

cord/.libs/cordbscs.o: In function `CORD_substr_closure':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:344: undefined reference to `_GC_malloc'

cord/.libs/cordbscs.o: In function `CORD_cat_char_star':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:214: undefined reference to `_GC_malloc'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:159: undefined reference to `_GC_malloc_atomic'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:190: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordbscs.o: In function `CORD_cat':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:255: undefined reference to `_GC_malloc'

cord/.libs/cordbscs.o: In function `CORD_substr_checked':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:367: undefined reference to `_GC_malloc_atomic'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordbscs.c:438: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordprnt.o: In function `CORD_vsprintf':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordprnt.c:276: undefined reference to `_GC_malloc_atomic'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordprnt.c:220: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordtest.o: In function `main':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordtest.c:229: undefined reference to `_GC_add_roots'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordtest.c:229: undefined reference to `_GC_gcollect'

cord/.libs/cordxtra.o: In function `CORD_from_file_lazy_inner':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:565: undefined reference to `_GC_malloc'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:585: undefined reference to `_GC_register_finalizer'

cord/.libs/cordxtra.o: In function `CORD_lf_func':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:547: undefined reference to `_GC_malloc_atomic'

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:549: undefined reference to `_GC_call_with_alloc_lock'

cord/.libs/cordxtra.o: In function `CORD_ec_flush_buf':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:416: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordxtra.o: In function `CORD_cat_char':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:63: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordxtra.o: In function `CORD_from_char_star':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:241: undefined reference to `_GC_malloc_atomic'

cord/.libs/cordxtra.o: In function `CORD_to_char_star':

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src/cord/!cordxtra.c:227: undefined reference to `_GC_malloc_atomic'

collect2: ld returned 1 exit status

make![1]: *** [libcord.la] Error 1

make![1]: Leaving directory `/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4/src'

make: *** [all-recursive] Error 1

Error building BoehmGC.

real    23m11.613s

user    4m16.141s

sys     14m45.815s

sage: An error occurred while installing boehm_gc-7.1.p4

Please email sage-devel !http://groups.google.com/group/sage-devel

explaining the problem and send the relevant part of

of /home/wstein/sage-4.4.3.alpha0/install.log.  Describe your computer, operating system, etc.

If you want to try to fix the problem yourself, *don't* just cd to

/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4 and type 'make check' or whatever is appropriate.

Instead, the following commands setup all environment variables

correctly and load a subshell for you to debug the error:

(cd '/home/wstein/sage-4.4.3.alpha0/spkg/build/boehm_gc-7.1.p4' && '/home/wstein/sage-4.4.3.alpha0/sage' -sh)

When you are done debugging, you can type "exit" to leave the

subshell.

@mwhansen
Copy link
Contributor Author

comment:9

I think there was a typo in the spkg that Minh made. There is an spkg at http://sage.math.washington.edu/home/mhansen/boehm_gc-7.1.p5.spkg that should work. Testing now on winxp1.

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

No branches or pull requests

2 participants