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

build fail on windows casued by typo in source code #5426

Closed
armgong opened this issue Jan 17, 2014 · 17 comments
Closed

build fail on windows casued by typo in source code #5426

armgong opened this issue Jan 17, 2014 · 17 comments
Labels
system:windows Affects only Windows

Comments

@armgong
Copy link
Contributor

armgong commented Jan 17, 2014

jl_dll_handle should be jl_dl_handle
prepare_glboal should be prepare_global

$ make
CC src/codegen.o
In file included from intrinsics.cpp:46:0,
from codegen.cpp:615:
ccall.cpp: In function 'llvm::Value* runtime_sym_lookup(llvm::PointerType_, char
*, char_, jl_codectx_t_)':
ccall.cpp:133:18: error: 'jl_dll_handle' was not declared in this scope
libsym = jl_dll_handle;
^
codegen.cpp: In function 'llvm::Value_ emit_expr(jl_value_t_, jl_codectx_t_, boo
l, bool)':
codegen.cpp:2555:64: error: 'prepare_glboal' was not declared in this scope
builder.CreateLoad(prepare_glboal(jlexc_var), true)),
^
Makefile:56: recipe for target 'codegen.o' failed
make[2]: *** [codegen.o] Error 1
Makefile:47: recipe for target 'julia-release' failed
make[1]: *** [julia-release] Error 2
Makefile:36: recipe for target 'release' failed
make: *** [release] Error 2

@joa-quim
Copy link

Well, for me it fails with

    CC src/gf.o
    CC src/support/asprintf.o
In file included from asprintf.c:29:0:
c:\mingw64\x86_64-w64-mingw32\include\stdio.h:556:7: error: static declaration of 'vsnprintf' follows non-static declaration
   int vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv)
       ^

@Keno
Copy link
Member

Keno commented Jan 18, 2014

I have fixed the build failures, but it still doesn't correctly build the system image for me. Maybe you have better luck.

@joa-quim
Copy link

Well, let's say I had a different luck. I now get

In file included from c:/programs/julia64/usr/include/llvm/DebugInfo.h:23:0,
                 from codegen.cpp:58:
c:/programs/julia64/usr/include/llvm/Support/Dwarf.h: At global scope:
c:/programs/julia64/usr/include/llvm/Support/Dwarf.h:65:28: error: 'UINT32_MAX' was not declared in this scope
 const uint32_t DW_CIE_ID = UINT32_MAX;
                            ^
In file included from c:/programs/julia64/usr/include/llvm/MC/MCInstrItineraries.h:19:0,
                 from c:/programs/julia64/usr/include/llvm/MC/MCSubtargetInfo.h:17,
                 from disasm.cpp:23,
                 from codegen.cpp:554:
c:/programs/julia64/usr/include/llvm/MC/MCSchedule.h:94:52: error: 'UINT16_MAX' was not declared in this scope
   static const unsigned short InvalidNumMicroOps = UINT16_MAX;
                                                    ^
c:/programs/julia64/usr/include/llvm/MC/MCSchedule.h:95:52: error: 'UINT16_MAX' was not declared in this scope
   static const unsigned short VariantNumMicroOps = UINT16_MAX - 1;

@JeffBezanson
Copy link
Member

Interesting; we do not see that error in our windows builds. Have you followed everything in the windows README?

@joa-quim
Copy link

Yes I did (I've been building Julia for almost a year).
Any way, problem solved after completely remove llvm and restart.

@JeffBezanson
Copy link
Member

Ok, glad it's working now.

@iceblue25
Copy link

I have the same issue as joa-quim . Removing llvm does not seem to solve the problem.

It fails while compiling src/disasm.o and src/flisp/

@tkelman
Copy link
Contributor

tkelman commented Sep 14, 2015

That usually means your usr/bin/llvm-config.exe failed to run. Check it in dependency walker.

@iceblue25
Copy link

Yes I think it has something to do with llvm since initially I got some errors like

usr/include/llvm/Object/RelocVisitor.h:203:34: error: 'UINT32_MAX' was not declared in this scope

What is dependency walker?

@tkelman
Copy link
Contributor

tkelman commented Sep 14, 2015

http://www.dependencywalker.com/

Though first, do you have a llvm-config.exe built in usr/bin? Can you run it by double-clicking from explorer?

@iceblue25
Copy link

when I try to lunch usr\bin\llvm-config.exe" using wine I get the error "not supported in 32-bit prefix".

Does have something to do with 32bit vs 64 bit wine?

I think julia makefile runs wine and not wine64 by default
and I have set override XC_HOST = x86_64-w64-mingw32
which targets 64 bit compilation. Is it related?

@tkelman
Copy link
Contributor

tkelman commented Sep 14, 2015

Yeah, you really should have mentioned that you're cross-compiling. You need a 64-bit capable version of wine, generally from what I've seen there wine and wine64 are often equivalent. What linux distribution are you using here? uname -a ?

@iceblue25
Copy link

Thanks for your responses:

uname -a returns:
Linux 3.2.0-72-generic #107-Ubuntu SMP Thu Nov 6 14:24:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I dont think wine and wine64 are equivalent
(I have to clear ~/.wine to run wine64 (if already wine was executed, it mentions ~/.wine is set for 32bit)

@tkelman
Copy link
Contributor

tkelman commented Sep 14, 2015

It may depend on where you got wine from, but most of the 64-bit wine packages and PPA's I've used install the launcher under both wine and wine64 names.

@iceblue25
Copy link

Hmm, where do I change my wine to wine64?

tried both building from source and PPA. Mixed the compilations between these two.

Now things might start to make sense. (If building wine from source results into wine->32bit wine64->64bit)

Should julia make files use wine64 by default for x86_64?

@tkelman
Copy link
Contributor

tkelman commented Sep 14, 2015

Possibly. I'm not surprised that having a mix of built-from-source copies and packaged copies could lead to things not working for 64 bit any more. You can probably get away with just locally changing this line

julia/Make.inc

Line 897 in a2c9f69

spawn = wine $(1)
to use wine64.

@iceblue25
Copy link

Just cleared ~/.wine/ and removed the compiled from source wine files and everything worked fine if wine is from PPA.
Thanks I will try to figure out the problem when compiling wine from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests

6 participants