Project

General

Profile

Actions

Bug #10027

closed

make at windows , err : _rb_file_expand_path_internal already defined in file. obj

Added by sevk (kk kk) over 10 years ago. Updated over 10 years ago.

Status:
Rejected
Assignee:
Target version:
-
ruby -v:
2.1.2
[ruby-core:63648]

Description

G:\ruby-2.1.2\win32>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        CC = cl -nologo
        LD = cl -nologo
        LDSHARED = cl -nologo -LD
        CFLAGS = -MD -Zi -W2 -O2b2xg- -G6 -Zm600
        XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32 -IG:/ruby-2.1.2/
include -IG:/ruby-2.1.2 -IG:/ruby-2.1.2/missing
        CPPFLAGS =
        DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
        SOLIBS =
Creating config.h
.ext\include\i386-mswin32\ruby\config.h updated
Creating config.status
compiling G:/ruby-2.1.2/main.c
main.c
compiling G:/ruby-2.1.2/dmydln.c
dmydln.c
compiling miniruby.rc
compiling G:/ruby-2.1.2/miniinit.c
miniinit.c
compiling G:/ruby-2.1.2/miniprelude.c
miniprelude.c
copying dummy probes.h
compiling G:/ruby-2.1.2/array.c
array.c
compiling G:/ruby-2.1.2/bignum.c
bignum.c
compiling G:/ruby-2.1.2/class.c
class.c
compiling G:/ruby-2.1.2/compar.c
compar.c
compiling G:/ruby-2.1.2/complex.c
complex.c
compiling G:/ruby-2.1.2/dir.c
dir.c
compiling G:/ruby-2.1.2/dln_find.c
dln_find.c
compiling G:/ruby-2.1.2/encoding.c
encoding.c
compiling G:/ruby-2.1.2/enum.c
enum.c
compiling G:/ruby-2.1.2/enumerator.c
enumerator.c
compiling G:/ruby-2.1.2/error.c
error.c
compiling G:/ruby-2.1.2/eval.c
eval.c
compiling G:/ruby-2.1.2/load.c
load.c
compiling G:/ruby-2.1.2/proc.c
proc.c
compiling file.c
file.c
compiling G:/ruby-2.1.2/gc.c
gc.c
G:/ruby-2.1.2/gc.c(4508) : warning C4244: '=' : conversion from 'double ' to 'un
signed int ', possible loss of data
G:/ruby-2.1.2/gc.c(4509) : warning C4244: '=' : conversion from 'double ' to 'un
signed int ', possible loss of data
compiling G:/ruby-2.1.2/hash.c
hash.c
compiling G:/ruby-2.1.2/inits.c
inits.c
compiling G:/ruby-2.1.2/io.c
io.c
compiling G:/ruby-2.1.2/marshal.c
marshal.c
compiling G:/ruby-2.1.2/math.c
math.c
compiling G:/ruby-2.1.2/node.c
node.c
compiling G:/ruby-2.1.2/numeric.c
numeric.c
compiling G:/ruby-2.1.2/object.c
object.c
compiling G:/ruby-2.1.2/pack.c
pack.c
compiling G:/ruby-2.1.2/parse.c
parse.c
compiling G:/ruby-2.1.2/process.c
process.c
compiling G:/ruby-2.1.2/random.c
random.c
compiling G:/ruby-2.1.2/range.c
range.c
compiling G:/ruby-2.1.2/rational.c
rational.c
compiling G:/ruby-2.1.2/re.c
re.c
compiling G:/ruby-2.1.2/regcomp.c
regcomp.c
compiling G:/ruby-2.1.2/regenc.c
regenc.c
compiling G:/ruby-2.1.2/regerror.c
regerror.c
compiling G:/ruby-2.1.2/regexec.c
regexec.c
compiling G:/ruby-2.1.2/regparse.c
regparse.c
compiling G:/ruby-2.1.2/regsyntax.c
regsyntax.c
compiling G:/ruby-2.1.2/ruby.c
ruby.c
compiling G:/ruby-2.1.2/safe.c
safe.c
compiling G:/ruby-2.1.2/signal.c
signal.c
compiling G:/ruby-2.1.2/sprintf.c
sprintf.c
compiling G:/ruby-2.1.2/st.c
st.c
compiling G:/ruby-2.1.2/strftime.c
strftime.c
compiling G:/ruby-2.1.2/string.c
string.c
compiling G:/ruby-2.1.2/struct.c
struct.c
compiling G:/ruby-2.1.2/time.c
time.c
compiling G:/ruby-2.1.2/transcode.c
transcode.c
compiling G:/ruby-2.1.2/util.c
util.c
compiling G:/ruby-2.1.2/variable.c
variable.c
compiling G:/ruby-2.1.2/version.c
version.c
compiling G:/ruby-2.1.2/compile.c
compile.c
compiling G:/ruby-2.1.2/debug.c
debug.c
compiling G:/ruby-2.1.2/iseq.c
iseq.c
compiling G:/ruby-2.1.2/vm.c
vm.c
compiling G:/ruby-2.1.2/vm_dump.c
vm_dump.c
compiling G:/ruby-2.1.2/vm_backtrace.c
vm_backtrace.c
compiling G:/ruby-2.1.2/vm_trace.c
vm_trace.c
compiling G:/ruby-2.1.2/thread.c
thread.c
compiling G:/ruby-2.1.2/cont.c
cont.c
compiling G:/ruby-2.1.2/enc/ascii.c
ascii.c
compiling G:/ruby-2.1.2/enc/us_ascii.c
us_ascii.c
compiling G:/ruby-2.1.2/enc/unicode.c
unicode.c
compiling G:/ruby-2.1.2/enc/utf_8.c
utf_8.c
compiling G:/ruby-2.1.2/newline.c
newline.c
compiling G:/ruby-2.1.2/missing/crypt.c
crypt.c
compiling G:/ruby-2.1.2/missing/ffs.c
ffs.c
compiling G:/ruby-2.1.2/missing/langinfo.c
langinfo.c
compiling G:/ruby-2.1.2/missing/lgamma_r.c
lgamma_r.c
compiling G:/ruby-2.1.2/missing/strlcat.c
strlcat.c
compiling G:/ruby-2.1.2/missing/strlcpy.c
strlcpy.c
compiling G:/ruby-2.1.2/win32/win32.c
win32.c
compiling G:/ruby-2.1.2/win32/file.c
file.c
compiling G:/ruby-2.1.2/missing/setproctitle.c
setproctitle.c
compiling G:/ruby-2.1.2/missing/acosh.c
acosh.c
compiling G:/ruby-2.1.2/missing/cbrt.c
cbrt.c
compiling G:/ruby-2.1.2/missing/erf.c
erf.c
compiling G:/ruby-2.1.2/missing/tgamma.c
tgamma.c
compiling G:/ruby-2.1.2/dmyext.c
dmyext.c
oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib imagehlp.lib shlwapi
.lib
linking miniruby.exe
file.obj : error LNK2005: _rb_file_expand_path_internal already defined in file.
obj
file.obj : error LNK2005: _rb_file_load_ok already defined in file.obj
file.obj : error LNK2005: _Init_w32_codepage already defined in file.obj
dir.obj : error LNK2001: unresolved external symbol _rb_enc_path_skip_prefix
dir.obj : error LNK2001: unresolved external symbol _rb_str_encode_ospath
load.obj : error LNK2001: unresolved external symbol _rb_str_encode_ospath
io.obj : error LNK2001: unresolved external symbol _rb_str_encode_ospath
ruby.obj : error LNK2001: unresolved external symbol _rb_str_encode_ospath
dir.obj : error LNK2001: unresolved external symbol _rb_file_const
dir.obj : error LNK2001: unresolved external symbol _rb_cFile
io.obj : error LNK2001: unresolved external symbol _rb_cFile
dir.obj : error LNK2001: unresolved external symbol _rb_file_directory_p
iseq.obj : error LNK2001: unresolved external symbol _rb_get_path
dir.obj : error LNK2001: unresolved external symbol _rb_get_path
load.obj : error LNK2001: unresolved external symbol _rb_get_path
io.obj : error LNK2001: unresolved external symbol _rb_get_path
process.obj : error LNK2001: unresolved external symbol _rb_get_path
dir.obj : error LNK2001: unresolved external symbol _rb_enc_path_end
dir.obj : error LNK2001: unresolved external symbol _rb_get_path_no_checksafe
dir.obj : error LNK2001: unresolved external symbol _rb_default_home_dir
dir.obj : error LNK2001: unresolved external symbol _rb_home_dir_of
dln_find.obj : error LNK2001: unresolved external symbol _eaccess
win32.obj : error LNK2001: unresolved external symbol _eaccess
eval.obj : error LNK2001: unresolved external symbol _rb_file_dirname
load.obj : error LNK2001: unresolved external symbol _rb_file_dirname
load.obj : error LNK2001: unresolved external symbol _rb_file_expand_path_fast
load.obj : error LNK2001: unresolved external symbol _rb_get_path_check_convert
load.obj : error LNK2001: unresolved external symbol _rb_is_absolute_path
load.obj : error LNK2001: unresolved external symbol _rb_get_path_check_to_strin
g
load.obj : error LNK2001: unresolved external symbol _rb_find_file
load.obj : error LNK2001: unresolved external symbol _rb_realpath_internal
ruby.obj : error LNK2001: unresolved external symbol _rb_realpath_internal
iseq.obj : error LNK2001: unresolved external symbol _rb_realpath_internal
load.obj : error LNK2001: unresolved external symbol _rb_file_absolute_path
load.obj : error LNK2001: unresolved external symbol _rb_find_file_ext_safe
load.obj : error LNK2001: unresolved external symbol _rb_find_file_safe
gc.obj : error LNK2001: unresolved external symbol __aligned_malloc
gc.obj : error LNK2001: unresolved external symbol __aligned_free
hash.obj : error LNK2001: unresolved external symbol _rb_path_check
io.obj : error LNK2001: unresolved external symbol _Init_File
ruby.obj : error LNK2001: unresolved external symbol _rb_file_expand_path
miniruby.exe : fatal error LNK1120: 26 unresolved externals
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

Files

10027.diff (824 Bytes) 10027.diff k_takata (Ken Takata), 07/15/2014 01:41 PM

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback
  • Assignee changed from nobu (Nobuyoshi Nakada) to windows

I can't reproduce it.
Could you try nmake V=1?

Updated by tag (Andrii Tereshchenko) over 10 years ago

kk kk wrote:

G:\ruby-2.1.2\win32>nmake

You should follow README.win32 and configure and nmake from parent folder, not from win32.

I.e. inside G:\ruby-2.1.2 call win32\configure.bat and then do nmake from same source code root. Not from win32.

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Feedback to Rejected

Updated by sevk (kk kk) over 10 years ago

Andrii Tereshchenko wrote:

kk kk wrote:

G:\ruby-2.1.2\win32>nmake

You should follow README.win32 and configure and nmake from parent folder, not from win32.

I.e. inside G:\ruby-2.1.2 call win32\configure.bat and then do nmake from same source code root. Not from win32.

thank you . how to clean all config files ?

Updated by sevk (kk kk) over 10 years ago

I have delete all source , and run configure.bat . have an other problem :


G:\dev-tools\ruby-2.1.2>win32\configure.bat --disable-install-doc
Creating Makefile.new
"type `nmake' to make ruby."

G:\dev-tools\ruby-2.1.2>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        CC = cl -nologo
        LD = cl -nologo
        LDSHARED = cl -nologo -LD
        CFLAGS = -MD -Zi -W2 -O2b2xg- -G6 -Zm600
        XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32 -I./include -I.
-I./missing
        CPPFLAGS =
        DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll
        SOLIBS =
compiling main.c
main.c

...
 
compiling ./missing/tgamma.c
tgamma.c
compiling dmyext.c
dmyext.c
oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib imagehlp.lib shlwapi
.lib
linking miniruby.exe
gc.obj : error LNK2001: unresolved external symbol __aligned_malloc
gc.obj : error LNK2001: unresolved external symbol __aligned_free
miniruby.exe : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

G:\dev-tools\ruby-2.1.2>

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

Those functions are in msvcrt.lib.
Have you applied service packs?

Updated by sevk (kk kk) over 10 years ago

Nobuyoshi Nakada wrote:

Those functions are in msvcrt.lib.
Have you applied service packs?

oh , I'll install service packs , thank you .

Updated by k_takata (Ken Takata) over 10 years ago

VC6 doesn't have _aligned_malloc/free. I think you should use VC7 or later.
Or, attached patch might fix the problem?

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

They seem provided as statically linked functions.

C:\Program Files (x86)\VC98\lib> dir msvcrt.lib
2000/03/07  00:00           236,042 msvcrt.lib

C:\Program Files (x86)\VC98\lib> ..\bin\dumpbin -symbols msvcrt.lib | findstr _aligned
005 00000000 SECT1  notype ()    External     | __aligned_malloc
00C 00000000 SECT3  notype ()    External     | __aligned_offset_malloc
011 00000000 SECT5  notype ()    External     | __aligned_realloc
017 00000000 SECT6  notype ()    External     | __aligned_offset_realloc
01A 00000000 SECT7  notype ()    External     | __aligned_free

Updated by k_takata (Ken Takata) over 10 years ago

Oh, I didn't know that.
I confirmed with VC6 SP6 that the function exists in the library.
(But they are not declared in malloc.h.)

Updated by sevk (kk kk) over 10 years ago

successed after install vs6sp6 :

ruby 2.1.2p95 (2014-05-08 revision 45877) [i386-mswin32]

thanks

Updated by sevk (kk kk) over 10 years ago

but many libs not found at windows . For example: zlib , readline ...

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

It's a different story.
You need to install those libraries by yourself on Windows.

Updated by sevk (kk kk) over 10 years ago

Nobuyoshi Nakada wrote:

It's a different story.
You need to install those libraries by yourself on Windows.

I think ruby can use the way like golang ,
just run src/all.bat , then everything is ok .

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0