Project

General

Profile

Actions

Bug #9955

closed

issue building dll on mingw, library not found

Added by lm (Laura Michaels) over 9 years ago. Updated 7 months ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [i386-mingw32]
[ruby-core:63225]
Tags:

Description

I hit a bug similar to https://bugs.ruby-lang.org/issues/8901. I'm building Ruby on MinGW using msys. When I run make, it errors out when it attempts to create the msvcrt-ruby210.dll. It's unable to find libgmp. There's a libgmp.dll.a in /usr/local/lib. LDFLAGS is set to -L/usr/local/lib. I see that LDFLAGS is used to build the executable and static library. I can't find it used when the dynamic library is created. Looking at the makefile (and makefile.in) where LIBRUBY_SO is linked, there's LDSHARED and DLDFLAGS, but I couldn't find LDFLAGS in the link command and didn't see another relevant environment variable to set along with LDFLAGS. I checked github and the latest version of makefile.in, but didn't notice any changes to get the library locations from LDFLAGS.

I added the following to my build script after running configure and I'm able to build ruby successfully:
sed -i.bk0 -e "s|$(DLDFLAGS)|$(LDFLAGS) $(DLDFLAGS)|" Makefile

I just wanted to add, this is the first time I've attempted to build Ruby with MinGW and it's so much nicer to create a build script for and compile and build on Windows than Perl or Python. Looks like the developers did a very nice job on MinGW platform support. Thanks.

Updated by nagachika (Tomoyuki Chikanaga) over 9 years ago

  • Status changed from Open to Assigned
Actions #2

Updated by naruse (Yui NARUSE) about 6 years ago

  • Target version deleted (2.2.0)
Actions #3

Updated by jeremyevans0 (Jeremy Evans) 7 months ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0