When I try to run the following code in Fedora 26 Cinnamon edition 64 bit:
#include <gmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int main(int argc, char * argv[]){
mpz_t a, b, c;
mpz_init_set_ui(a,1); /* a = 1 */
mpz_init_set_ui(b,1); /* b = 1 */
mpz_init(c);
for (int i=1; i <= 2 ; ++i){
mpz_add(c,a,b); /* c = a + b */
mpz_mul_ui(a,b,1);
mpz_mul_ui(b,c,1);
}
mpz_out_str(stdout,10,c);
printf ("\n");
mpz_clear(a);
mpz_clear(b);
mpz_clear(c);
return 1;
}
I get the following error message:
fatal error: gmp-x86_64.h: No such file or directory
#include "gmp-x86_64.h"
compilation terminated.
I have got the gmp library installed, when I do whereis gmp I get:
gmp: /usr/include/gmp.h /usr/share/info/gmp.info-1.gz /usr/share/info/gmp.info.gz /usr/share/info/gmp.info-2.gz
And looking for gmp-devel:
When I do dnf install gmp-devel I get:
Last metadata expiration check: 1:48:01 ago on Sun 22 Oct 2017 09:09:57 AM BST.
Package gmp-devel-1:6.1.2-4.fc26.i686 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
However when I do whereis gmp-devel I only get:
gmp-devel:
Any idea why my system is not recognizing the GMP library?
Make sure you have gmp-devel installed in your system. It provides the necessary files to compile an application with gmp.
The error you report shows missing header files (*.h) which are typically distributed within -devel (or -dev depending on the distribution).
Related
My os is windows running on parallels Desktop app on Mac M2
When I Try to build the libraries I get this error
fatal error C1189: #error: "Byte order of target CPU unknown."
This is what I got in the console of VS when I finished installing
274>------ Build started: Project: ALL_BUILD, Configuration: Release ARM64 ------ 274>Building Custom Rule C:/VTK-9.2.2/src/CMakeLists.txt ========== Build: 157 succeeded, 117 failed, 0 up-to-date, 0 skipped ========== ========== Elapsed 11:48.565 ==========
If you are using an old (<2.8 cmake, this can be the issue): https://cmake.org/Bug/view.php?id=13808
In any case, you might try to set the byte-order manually in your cmake file:
set( CMAKE_CXX_BYTE_ORDER BIG_ENDIAN)
You could also check that CMAKE_OSX_ARCHITECTURES only specify one architecture or all architectures shares the same byte-order.
I build tensorflow-cc from vcpkg.
And I created a test project to test the lib.
When I compile the project, the error message output is as follows.
error C4996: 'tensorflow::int64': Use int64_t instead.
Seems like many people hit this and there seems to be no solution that I can find.
Follow exact instructions, downloaded precompiled libs, v 3.0.5 - latest stable build
set wxwin env var
make new 32bit empty project
copy the hello world app into new source file
set additional include
set preproc defintions -> UNICODE & _UNICODE on
set linker libs
build ->
1>------ Build started: Project: wxtest, Configuration: Debug Win32 ------
1>Source.cpp
1>c:\work\wxwin\include\wx\wxcrt.h(487): error C3861: 'wxStrcoll': identifier not found
1>c:\work\wxwin\include\wx\wxcrt.h(487): message : 'wxStrcoll': function was not declared in the template definition context and can be found only via argument-dependent lookup in the instantiation context
1>c:\work\wxwin\include\wx\wxcrt.h(496): message : see reference to function template instantiation 'int wxStrcoll_String<const wchar_t*>(const wxString &,const T &)' being compiled
1> with
1> [
1> T=const wchar_t *
1> ]
1>Done building project "wxtest.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Unfortunately you need to manually modify the header to fix the build with MSVS 2019 in 3.0.5 and remove defined(__VISUALC__) || part of the check before wxNEEDS_DECL_BEFORE_TEMPLATE definition in wx/wxcrt.h.
FWIW this problem was fixed since a long time (~6 years) in wx 3.1 and you can compile 3.1.3 or the soon to be released 3.1.4 out of the box with MSVS 2019.
I've been trying to build Mono 3.2.3 on Solaris 11 with no luck. I've made a few minor code changes and turned off configuration features to get to this point but now I'm stuck with mono crashing while trying to build System.dll. Any ideas?
MONO_PATH="./../../class/lib/basic:$MONO_PATH" /home/axsadm/mono-3.2.3/runtime/mono-wrapper ./../../class/lib/basic/basic.exe /codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699 -nostdlib -lib:./../../class/lib/build -r:mscorlib.dll -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -target:library -out:../../class/lib/build/tmp/System.dll #System.dll.sources
+ r=/home/axsadm/mono-3.2.3
+ MONO_CFG_DIR=/home/axsadm/mono-3.2.3/runtime/etc
+ PATH=/home/axsadm/mono-3.2.3/runtime/_tmpinst/bin:/usr/bin:/usr/sbin
+ MONO_SHARED_DIR=/home/axsadm/mono-3.2.3/runtime
+ export MONO_CFG_DIR MONO_SHARED_DIR PATH
+ [ -n '' ]
+ exec /home/axsadm/mono-3.2.3/libtool '--mode=execute' /home/axsadm/mono-3.2.3/mono/mini/mono --config /home/axsadm/mono-3.2.3/runtime/etc/mono/config ./../../class/lib/basic/basic.exe /codepage:65001 -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699 -nostdlib -lib:./../../class/lib/build -r:mscorlib.dll -optimize /noconfig -nowarn:618 -d:CONFIGURATION_2_0 -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -target:library -out:../../class/lib/build/tmp/System.dll #System.dll.sources
* Assertion at threads.c:1001, condition `info' not met
Native stacktrace:
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_handle_native_sigsegv+0x1b8 [0x187c58]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'sigabrt_signal_handler+0xa0 [0x1ed97c]
/lib/libc.so.1'__sighndlr+0xc [0xff0254f0]
/lib/libc.so.1'call_user_handler+0x370 [0xff018e50]
/lib/libc.so.1'sigacthandler+0x58 [0xff019040]
/lib/libc.so.1'_lwp_kill+0x8 [0xff029fa0]
/lib/libc.so.1'abort+0xc8 [0xfefaac2c]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'monoeg_g_logv+0x174 [0x3d5454]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'monoeg_assertion_message+0x38 [0x3d54e8]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_thread_attach_full+0x2bc [0x2dc650]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_thread_attach+0x10 [0x2dc37c]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_runtime_init+0x23c [0x314034]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mini_init+0x1a60 [0x77158]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_main+0x232c [0x1457a4]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'mono_main_with_options+0x48c [0x5fa30]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'main+0x2c [0x5fa74]
/home/axsadm/mono-3.2.3/mono/mini/mono-boehm'_start+0x5c [0x5f3e4]
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
gmake[8]: *** [../../class/lib/build/tmp/System.dll] Abort (core dumped)
Configuration:
Engine:
GC: included Boehm
TLS: pthread
SIGALTSTACK: no
Engine: Building and using the JIT
oprofile: no
BigArrays: no
DTrace: no
LLVM Back End: no (dynamically loaded: no)
Libraries:
.NET 2.0/3.5: yes
.NET 4.0: yes
.NET 4.5: yes
MonoDroid: no
MonoTouch: no
JNI support: IKVM Native
libgdiplus: assumed to be installed
zlib: system zlib
This might be a bit late, but for me I had more luck using the external Boehm GC as opposed to the bundled/included one.
./autogen.sh --prefix=/usr --disable-dtrace --with-sgen=no --with-gc=boehm
This seemed to work OK for Solaris 10 and 11 on Intel. I'm still working on SPARC!
Good luck,
Steve
I'm trying to create dll with 'yaml-cpp-0.3.0' under Visual Studio 8 2005 and getting linking error for 'INSTALL', 'run-tests'
Error 1 error LNK2019: unresolved external symbol "void __cdecl YAML::operator>>(class YAML::Node const &,class YAML::Binary &)" (??5YAML##YAXABVNode#0#AAVBinary#0##Z) referenced in function "public: class YAML::Binary const __thiscall YAML::Node::to(void)const " (??$to#VBinary#YAML###Node#YAML##QBE?BVBinary#1#XZ) parsertests.obj
Error 2 fatal error LNK1120: 1 unresolved externals ....\yaml-cpp_dll\build\test\Debug\run-tests.exe 1
using the general steps mentioned by the user at http://code.google.com/p/yaml-cpp/issues/detail?id=88
cd yaml-cpp for 'yaml-cpp-0.3.0'
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -G "Visual Studio 8 2005" ..
Looking for help how to fix this. Any inputs is appreciated.
I had the same linking error with Visual Studio 9 2008. The problem is that the >> operator declared in binary.h is not exported. After having done the following modifications in binary.h everything worked fine:
#include "yaml-cpp/dll.h" // add a new include to have YAML_CPP_API defined
...
// add the missing YAML_CPP_API
YAML_CPP_API void operator >> (const Node& node, Binary& binary);