Sep 25, 2017, 09:06 am

News:

Ufasoft Coin 0.110 new features: SOCKS5, TOR,
bootstrap.dat DB format


Trouble compiling ufasoft miner on windows (VS2012)

Started by nuhash, May 17, 2013, 12:51 am

previous topic - next topic
Go Down

nuhash

Hi, im trying to compile ufasoft miner and i am having errors related to using precompiled headers with jansson

Code: [Select]

3>  dump.c
3>foreign\jansson\dump.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  error.c
3>foreign\jansson\error.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  hashtable.c
3>foreign\jansson\hashtable.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  load.c
3>foreign\jansson\load.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  memory.c
3>foreign\jansson\memory.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  strbuffer.c
3>foreign\jansson\strbuffer.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  strconv.c
3>foreign\jansson\strconv.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  value.c
3>foreign\jansson\value.c : fatal error C1853: 'C:\Users\Sameh\Downloads\miner\ufasoft_coin-0.56\Release\Win32_obj\bitcoin-miner.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
3>  Generating Code...


If i disable precompiled headers for the jansson files then i get the following error:
Code: [Select]
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(93): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(94): error C2085: 'json_incref' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(94): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(104): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(105): error C2085: 'json_decref' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(105): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(150): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(151): error C2085: 'json_object_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(151): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(156): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(157): error C2085: 'json_object_set_nocheck' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(157): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(162): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(163): error C2085: 'json_object_iter_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(163): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(177): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(178): error C2085: 'json_array_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(178): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(183): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(184): error C2085: 'json_array_append' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(184): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(189): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(190): error C2085: 'json_array_insert' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(190): error C2143: syntax error : missing ';' before '{'

ufasoft

Add following compiling option:
ForcedIncludeFiles: std_config.h

for jansson .c files

nuhash

I set the forcedincludefiles for the jansson files and also set them to not use precompiled headers and i still get the following error message:

Code: [Select]

3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(93): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(94): error C2085: 'json_incref' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(94): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(104): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(105): error C2085: 'json_decref' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(105): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(150): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(151): error C2085: 'json_object_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(151): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(156): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(157): error C2085: 'json_object_set_nocheck' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(157): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(162): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(163): error C2085: 'json_object_iter_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(163): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(177): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(178): error C2085: 'json_array_set' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(178): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(183): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(184): error C2085: 'json_array_append' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(184): error C2143: syntax error : missing ';' before '{'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(189): error C2054: expected '(' to follow 'inline'
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(190): error C2085: 'json_array_insert' : not in formal parameter list
3>c:\users\sameh\downloads\miner\ufasoft_coin-0.56\foreign\jansson\jansson.h(190): error C2143: syntax error : missing ';' before '{'


Enabling precompiled headers does not work either

ufasoft


nuhash

which versions of cuda sdk and amd sdk do you use to compile the miner, vs2012 complains that it cant find any imports from opencl.dll, nvcuda.dll, aticalrt64.dll and aticalcl64.dll;

ufasoft


which versions of cuda sdk and amd sdk do you use to compile the miner, vs2012 complains that it cant find any imports from opencl.dll, nvcuda.dll, aticalrt64.dll and aticalcl64.dll;

Add .lib files to Linker options of the project.
Default configuration is CPU-only, so no  .libs linked by default.

nuhash

Code: [Select]
2>      Searching C:\Program Files (x86)\AMD APP\lib\opencl.lib:
2>      Searching C:\Program Files (x86)\AMD APP\lib\aticalrt64.lib:
2>      Searching C:\Program Files (x86)\AMD APP\lib\aticalcl64.lib:
2>      Searching C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\Win32\cuda.lib:


it loads the .libs but still does not find any imports

ufasoft


it loads the .libs but still does not find any imports

What imported symbolic names are not resolved?

nuhash

for all the dlls it says

xxx.dll ignored; no imports found

ufasoft


for all the dlls it says

xxx.dll ignored; no imports found

It is not error. Just an information message, because you are compiling GPU-less configuration

nuhash

:-[

i included the gpu mining files and set UCFG_BITCOIN_USE_CAL to 1
however, i am now getting many unresolved symbols for both nvidia and amd sdk functions

Code: [Select]

2>miner-cuda.obj : error LNK2019: unresolved external symbol cuMemAlloc referenced in function "public: __cdecl Coin::CudaTask::CudaTask(class Coin::GpuMiner &,class Ext::Gpu::CuEngine &,class Ext::Gpu::CuDevice const &)" (??0CudaTask@Coin@@QEAA@AEAVGpuMiner@1@AEAVCuEngine@Gpu@Ext@@AEBVCuDevice@45@@Z)
2>miner-cuda.obj : error LNK2019: unresolved external symbol cuMemFree referenced in function "public: __cdecl Ext::Gpu::CuBuffer::~CuBuffer(void)" (??1CuBuffer@Gpu@Ext@@QEAA@XZ)
2>miner-cuda.obj : error LNK2019: unresolved external symbol cuMemcpyHtoD referenced in function "public: void __cdecl Ext::Gpu::CuBuffer::FromHostMem(void const *,unsigned __int64)" (?FromHostMem@CuBuffer@Gpu@Ext@@QEAAXPEBX_K@Z)
2>miner-cuda.obj : error LNK2019: unresolved external symbol cuMemcpyDtoH referenced in function "public: virtual void __cdecl Coin::CudaTask::Run(void)" (?Run@CudaTask@Coin@@UEAAXXZ)
...
2>gpu-cuda.obj : error LNK2019: unresolved external symbol cuLaunchGrid referenced in function "public: void __cdecl Ext::Gpu::CuKernel::Launch(int,int)" (?Launch@CuKernel@Gpu@Ext@@QEAAXHH@Z)
2>gpu-cuda.obj : error LNK2019: unresolved external symbol cuCtxCreate referenced in function "public: class Ext::Gpu::CuContext __cdecl Ext::Gpu::CuDevice::CreateContext(unsigned int)" (?CreateContext@CuDevice@Gpu@Ext@@QEAA?AVCuContext@23@I@Z)
2>gpu-cuda.obj : error LNK2019: unresolved external symbol cuCtxDestroy referenced in function "public: __cdecl Ext::ResourceWrapper<struct CUctx_st *>::~ResourceWrapper<struct CUctx_st *>(void)" (??1?$ResourceWrapper@PEAUCUctx_st@@@Ext@@QEAA@XZ)

2>ext-opencl.obj : error LNK2019: unresolved external symbol clGetPlatformIDs referenced in function "public: static class std::vector<class Ext::Cl::Platform,class std::allocator<class Ext::Cl::Platform> > __cdecl Ext::Cl::Platform::GetAll(void)" (?GetAll@Platform@Cl@Ext@@SA?AV?$vector@VPlatform@Cl@Ext@@V?$allocator@VPlatform@Cl@Ext@@@std@@@std@@XZ)
2>ext-opencl.obj : error LNK2019: unresolved external symbol clGetPlatformInfo referenced in function "public: class Ext::String __cdecl Ext::Cl::Platform::get_Vendor(void)const " (?get_Vendor@Platform@Cl@Ext@@QEBA?AVString@3@XZ)
2>ext-opencl.obj : error LNK2019: unresolved external symbol clGetDeviceIDs referenced in function "public: class std::vector<class Ext::Cl::Device,class std::allocator<class Ext::Cl::Device> > __cdecl Ext::Cl::Platform::GetDevices(unsigned __int64)const " (?GetDevices@Platform@Cl@Ext@@QEBA?AV?$vector@VDevice@Cl@Ext@@V?$allocator@VDevice@Cl@Ext@@@std@@@std@@_K@Z)
...


i also noticed you have defined values for the HD 7000 series cards is this a hint for which version sdk i should install

ufasoft

Then enable el\comp\gpu-cuda.cpp for compilation

nuhash

#12
May 26, 2013, 09:17 am Last Edit: May 26, 2013, 09:44 am by nuhash
gpu-cuda.cpp is enabled, im not sure why it doesnt import the symbols

EDIT: I dont have a nvidia gpu and so i dont have the nvidia dlls, would this be an issue when compiling

ufasoft


gpu-cuda.cpp is enabled, im not sure why it doesnt import the symbols

EDIT: I dont have a nvidia gpu and so i dont have the nvidia dlls, would this be an issue when compiling

If you don't want CUDA disable both:  gpu-cuda.cpp and miner-cuda.cpp

nuhash

#14
May 26, 2013, 04:43 pm Last Edit: May 26, 2013, 08:01 pm by nuhash
I still get 37 unresolved symbols from ext-opencl and miner-opencl

EDIT: Just noticed that the solution outputs a win32.dll in c:\release, what is this dll for?

Go Up