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

Windows binaries failure #10

Closed
stevengj opened this issue Apr 29, 2015 · 15 comments
Closed

Windows binaries failure #10

stevengj opened this issue Apr 29, 2015 · 15 comments

Comments

@stevengj
Copy link
Member

Unfortunately, the Appveyor tests are indicating that the Windows binaries I generated (via MinGW) aren't correct. Something in my cross-compile build script must be wrong.

@stevengj stevengj changed the title Windows binaries Windows binaries failure Apr 29, 2015
@quinnj
Copy link
Collaborator

quinnj commented May 1, 2016

Happy to help out here. I'm indeed seeing some pretty odd behavior like

julia> parse(Dec64, "1")
+0E-398

julia> parse(Dec64, "225")
+0E-398

@quinnj
Copy link
Collaborator

quinnj commented May 2, 2016

@stevengj, if you have an example build script, I can try working on getting the windows binaries to compile. I'm trying to add this package as an ODBC dependency (for handling SQL numeric/decimal types), so I'm eager to get this resolved.

@quinnj
Copy link
Collaborator

quinnj commented May 2, 2016

we could also ping @tkelman about potentially helping us out here.

@stevengj
Copy link
Member Author

stevengj commented May 2, 2016

@quinnj, to cross-compile the 64-bit Windows version, I believe I was using make CC_NAME_INDEX=3 CC_INDEX=3 _HOST_OS=Windows_NT _HOST_ARCH=x86_64 _NUM_CPUS=1 CC=x86_64-w64-mingw32-gcc CFLAGS_OPT="-O2 -DBID_THREAD=" CALL_BY_REF=0 GLOBAL_RND=1 GLOBAL_FLAGS=1 UNCHANGED_BINARY_FLAGS=1 in the LIBRARY directory of the unpacked tarball from http:https://www.netlib.org/misc/intel/IntelRDFPMathLib20U1.tar.gz.

However, that directory also includes some windowsbuild batch files that you can try.

@stevengj
Copy link
Member Author

stevengj commented May 2, 2016

The good news is that once we get 32- and 64-bit DLLs built for Windows, we probably will not have to touch them again for a long, long time.

@stevengj
Copy link
Member Author

stevengj commented May 2, 2016

(Or maybe my current binaries are okay, but they are using some alternate calling convention like stdcall on Windows so the ccalls need to be tweaked? I don't see any indication of this in the library source, though.)

@quinnj
Copy link
Collaborator

quinnj commented May 3, 2016

Hmmm, I tried stdcall, but it didn't seem to make a difference (I tried all the various calling conventions actually with no difference). I can never get parse(Dec64, x) to ever return anything but 64 zero bits, i.e. 0x0000000000000000. I was trying it on a loaner windows machine, but I'll try to do my own compiling on my own machine when I get a chance.

@quinnj
Copy link
Collaborator

quinnj commented May 3, 2016

Hmm, I'm having a bit of trouble with the command you gave me; it seems like it only wants to generate a .lib file instead of a .dll. Is there an extra step afterwards to turn it into a shared library from static?

@quinnj
Copy link
Collaborator

quinnj commented May 3, 2016

I'm also getting to the very last step and seeing this error:

>make _HOST_OS=Windows_NT top
lib -nologo /out:libbid.lib bid64_acos.obj bid64_acosh.obj bid64_asin.obj bid64_asinh.obj bid64_atan.obj bid64_atan2.obj bid64_atanh.obj bid64_cbrt.obj bid64_cos.obj bid64_cosh.obj bid64_erf.obj bid64_erfc.obj bid64_exp.obj bid64_exp10.obj bid64_exp2.obj bid64_expm1.obj bid64_hypot.obj bid64_lgamma.obj bid64_log.obj bid64_log10.obj bid64_log1p.obj bid64_log2.obj bid64_pow.obj bid64_sin.obj bid64_sinh.obj bid64_tan.obj bid64_tanh.obj bid64_tgamma.obj bid128_acos.obj bid128_acosh.obj bid128_asin.obj bid128_asinh.obj bid128_atan.obj bid128_atan2.obj bid128_atanh.obj bid128_cbrt.obj bid128_cos.obj bid128_cosh.obj bid128_erf.obj bid128_erfc.obj bid128_exp.obj bid128_exp10.obj bid128_exp2.obj bid128_expm1.obj bid128_hypot.obj bid128_lgamma.obj bid128_log.obj bid128_log10.obj bid128_log1p.obj bid128_log2.obj bid128_pow.obj bid128_sin.obj bid128_sinh.obj bid128_tan.obj bid128_tanh.obj bid128_tgamma.obj bid32_add.obj bid32_compare.obj bid32_div.obj bid32_fdimd.obj bid32_fma.obj bid32_fmod.obj bid32_frexp.obj bid32_ldexp.obj bid32_llrintd.obj bid32_logb.obj bid32_logbd.obj bid32_lrintd.obj bid32_lround.obj bid32_minmax.obj bid32_modf.obj bid32_mul.obj bid32_nearbyintd.obj bid32_next.obj bid32_nexttowardd.obj bid32_noncomp.obj bid32_quantexpd.obj bid32_quantize.obj bid32_rem.obj bid32_round_integral.obj bid32_scalb.obj bid32_scalbl.obj bid32_sqrt.obj bid32_string.obj bid32_to_int16.obj bid32_to_int32.obj bid32_to_int64.obj bid32_to_int8.obj bid32_to_uint16.obj bid32_to_uint32.obj bid32_to_uint64.obj bid32_to_uint8.obj bid64_add.obj bid64_compare.obj bid64_div.obj bid64_fdimd.obj bid64_fma.obj bid64_fmod.obj bid64_frexp.obj bid64_ldexp.obj bid64_llrintd.obj bid64_logb.obj bid64_logbd.obj bid64_lrintd.obj bid64_lround.obj bid64_minmax.obj bid64_modf.obj bid64_mul.obj bid64_nearbyintd.obj bid64_next.obj bid64_nexttowardd.obj bid64_noncomp.obj bid64_quantexpd.obj bid64_quantize.obj bid64_rem.obj bid64_round_integral.obj bid64_scalb.obj bid64_scalbl.obj bid64_sqrt.obj bid64_string.obj bid64_to_int16.obj bid64_to_int32.obj bid64_to_int64.obj bid64_to_int8.obj bid64_to_uint16.obj bid64_to_uint32.obj bid64_to_uint64.obj bid64_to_uint8.obj bid128_add.obj bid128_compare.obj bid128_div.obj bid128_fdimd.obj bid128_fma.obj bid128_fmod.obj bid128_frexp.obj bid128_ldexp.obj bid128_llrintd.obj bid128_logb.obj bid128_logbd.obj bid128_lrintd.obj bid128_lround.obj bid128_minmax.obj bid128_modf.obj bid128_mul.obj bid128_nearbyintd.obj bid128_next.obj bid128_nexttowardd.obj bid128_noncomp.obj bid128_quantexpd.obj bid128_quantize.obj bid128_rem.obj bid128_round_integral.obj bid128_scalb.obj bid128_scalbl.obj bid128_sqrt.obj bid128_string.obj bid128_to_int16.obj bid128_to_int32.obj bid128_to_int64.obj bid128_to_int8.obj bid128_to_uint16.obj bid128_to_uint32.obj bid128_to_uint64.obj bid128_to_uint8.obj strtod32.obj strtod64.obj strtod128.obj wcstod32.obj wcstod64.obj wcstod128.obj bid32_acos.obj bid32_acosh.obj bid32_asin.obj bid32_asinh.obj bid32_atan.obj bid32_atan2.obj bid32_atanh.obj bid32_cbrt.obj bid32_cos.obj bid32_cosh.obj bid32_erf.obj bid32_erfc.obj bid32_exp.obj bid32_exp10.obj bid32_exp2.obj bid32_expm1.obj bid32_hypot.obj bid32_lgamma.obj bid32_log.obj bid32_log10.obj bid32_log1p.obj bid32_log2.obj bid32_pow.obj bid32_sin.obj bid32_sinh.obj bid32_tan.obj bid32_tanh.obj bid32_tgamma.obj bid32_sub.obj bid32_to_bid128.obj bid32_to_bid64.obj bid64_to_bid128.obj bid128_2_str_tables.obj bid_binarydecimal.obj bid_convert_data.obj bid_decimal_data.obj bid_decimal_globals.obj bid_dpd.obj bid_feclearexcept.obj bid_fegetexceptflag.obj bid_feraiseexcept.obj bid_fesetexceptflag.obj bid_fetestexcept.obj bid_flag_operations.obj bid_from_int.obj bid_round.obj bid128.obj
make: lib: Command not found
makefile:376: recipe for target 'libbid.lib' failed
make: *** [libbid.lib] Error 127

@quinnj
Copy link
Collaborator

quinnj commented May 4, 2016

Bump. I have some more time tonight/tomorrow morning to play around with this.

@stevengj
Copy link
Member Author

stevengj commented May 4, 2016

The lib.exe program is a standard MS developer tool (https://msdn.microsoft.com/en-us/library/7ykb2k5f.aspx) that I think comes with Visual Studio?

However, you need to build a .dll, not a .lib (static library).

@quinnj
Copy link
Collaborator

quinnj commented May 4, 2016

Ah, ok, I'll look into getting the lib.exe tool. I'm a little confused though, does the lib.exe program generate the .dll? I ask because the command you gave me above just generated the .lib file, so I wasn't sure what I was missing ot take it from a .lib to a .dll.

@stevengj
Copy link
Member Author

stevengj commented May 5, 2016

lib can make DLLs if I remember correctly, but you generally need to build things a bit differently to build a DLL so that it knows what to export. It looks like the default make is building a static library...

@tkelman
Copy link

tkelman commented May 5, 2016

no, lib is the msvc equivalent of ar. you need link.exe to create dlls, though it would be cleaner to just use a standard build system that knows how to deal with mingw as opposed to working around makefiles that haven't been updated in decades

@stevengj
Copy link
Member Author

The DLLs seem to be working now.

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

3 participants