I have a source code of a tool written in c++. The tool is compose of several modules that compiles perfectly using a set of nested makefiles. I wanted to add a certain feature to a specific module in that tool that requires using the gmplib library. However, it gives me this error:
### Module sdf - sdf3cost
Creating executable sdf3cost-sdf
/sdf3/build/work/Linux/lib/libsdf3-sdf.so: undefined reference to `__gmpz_clear'
/sdf3/build/work/Linux/lib/libsdf3-sdf.so: undefined reference to `__gmpz_init_set_ui'
collect2: error: ld returned 1 exit status
make[3]: *** [sdf3cost-sdf] Error 1
make[2]: *** [sdf3cost] Error 2
make[1]: *** [tools] Error 2
make: *** [sdf] Error 2
I think that I know the reason behind that error is related to the usage of -lgmp flag. However, I don't know where to add it in the makefiles since they are nested. Or maybe it is a different problem, I don't know. Can any body help me please?
Related
My Fortran project has a target comprised of a module containing helper functions and a few generated source files for tests. The test modules all use the helper module (i.e. use test_tools). I'm building with CMake, so the source list looks like
add_custom_command(
# here's where I'm doing the stuff to generate test_SR#.F90
GENERATED
)
set(SOURCES
test_tools.F90
test_SR1.F90 # contains `use test_tools`
test_SR2.F90 # contains `use test_tools`
...
test_SR20.F90 # contains `use test_tools`
)
This compiles fine on macOS and Linux, but on Windows with the Visual Studio 15 2017 generator test_tools.F90 is not compiled before test_SR#.F90 so on the first attempt the compile fails.
6> ... Done. Results in C:/Users/rmudafor/Desktop/openfast453/build/unit_tests/tests/beamdyn/test_BD_CrvMatrixH.F90
6>Generating ../tests/beamdyn/test_BD_InputGlobalLocal.F90
6>Processing file C:/Users/rmudafor/Desktop/openfast453/unit_tests/../modules/beamdyn/tests/test_BD_InputGlobalLocal.F90
6> ... Done. Results in C:/Users/rmudafor/Desktop/openfast453/build/unit_tests/tests/beamdyn/test_BD_InputGlobalLocal.F90
6>Compiling with Intel(R) Visual Fortran Compiler 19.1.1.216 [Intel(R) 64]...
6>test_BD_InputGlobalLocal.F90
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InputGlobalLocal.F90(19): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [TEST_TOOLS]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InputGlobalLocal.F90(47): error #6404: This name does not have a type, and must have an explicit type. [CALCROTATIONMATRIX]
6>compilation aborted for C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InputGlobalLocal.F90 (code 1)
6>test_BD_InitShpDerJaco.F90
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InitShpDerJaco.F90(9): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [TEST_TOOLS]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InitShpDerJaco.F90(54): error #6404: This name does not have a type, and must have an explicit type. [SIMPLEPARAMETERTYPE]
6>compilation aborted for C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_InitShpDerJaco.F90 (code 1)
6>test_BD_DistrLoadCopy.F90
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_DistrLoadCopy.F90(9): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [TEST_TOOLS]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_DistrLoadCopy.F90(32): error #6404: This name does not have a type, and must have an explicit type. [SIMPLEPARAMETERTYPE]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_DistrLoadCopy.F90(33): error #6404: This name does not have a type, and must have an explicit type. [SIMPLEMISCVARTYPE]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_DistrLoadCopy.F90(34): error #6404: This name does not have a type, and must have an explicit type. [SIMPLEINPUTTYPE]
6>compilation aborted for C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_DistrLoadCopy.F90 (code 1)
6>test_BD_CrvCompose.F90
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_CrvCompose.F90(14): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [TEST_TOOLS]
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_CrvCompose.F90(48): error #6404: This name does not have a type, and must have an explicit type. [CALCROTATIONMATRIX]
6>compilation aborted for C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_CrvCompose.F90 (code 1)
6>test_BD_GaussPointWeight.F90
6>C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_GaussPointWeight.F90(13): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [TEST_TOOLS]
6>compilation aborted for C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\tests\beamdyn\test_BD_GaussPointWeight.F90 (code 1)
6>test_tools.F90 <---- HERE: this one should be compiled before the ones above
6>test_BD_diffmtc.F90
6>test_ExtractRelativeRotation.F90
6>test_BD_CrvMatrixH.F90
6>test_BD_QPData_mEta_rho.F90
6>test_BD_CrvMatrixR.F90
6>test_BD_GenerateGLL.F90
6>test_BD_CrvExtractCrv.F90
6>test_BD_GravityForce.F90
6>test_BD_CheckRotMat.F90
6>driver.F90
6>
6>Build log written to "file://C:\Users\rmudafor\Desktop\openfast453\build\unit_tests\beamdyn\beamdyn_utest.dir\Release\BuildLog.htm"
6>beamdyn_utest - 16 error(s), 0 warning(s)
========== Build: 5 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If I let the build continue to the end, then test_tools will have been compiled and it will succeed the second time. This isn't an issue when I'm doing this manually, but it does prevent automating the build and test sequence.
I'd like to somehow indicate to CMake that it must compile test_tools before any of the test_SR#.F90 modules.
I'm using CMake 3.17 on Windows, Visual Studio 15 2017, and Intel 2020 tools.
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
I am getting an error when archiving a binary.
Please help
google analytics doesn't support bitcode so I ended up with disabling bitcode in settings to get rid of this error
Your compiler is crashing. Click on the error, it will take you to the full log; sometimes there is more info there.
If this is Swift then it was happening to me a lot when making mistakes with blocks (e.g. missing a return or returning the wrong type). But it could be anything. You have to figure out what is causing the crash.
Also, upgrade to Xcode 7.3; maybe it is fixed there. You need to anyway if you're going to submit that app.
I am trying to program a Microchip pic mirocontroller. I am using Ubuntu 14.04LTS. When ever I try to build my project with MPLABX IDE and C30 v3.30c compiler, after all the files have been compiled, I get,
Segmentation fault (core dumped)
make[2]: *** [dist/default/production/MYproj.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/home/siddharth/work/MYproj.X'
make[1]: Leaving directory `/home/siddharth/work/MYproj.X'
BUILD FAILED (exit value 2, total time: 4s)
I'm almost sure it is got something to do with my setup of the IDE as I have already used ubuntu and MPLABX for embedded development without any issues.
Can some one help me? any help would be greatly appreciated.
Thanks!
This is an Internal Compiler error, a bug in the Compiler, triggered by a code sequence in your project. Typically the Compiler reports the line of code where the Segment fault has happened, along with the Compiler's source file name.
Most probably this should be fixed with the MPLAB C30_v3.31, which is available for download from the address
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2115
If not then you can try the latest XC16 Compiler, available for download from the website
microchip.com/compilers
If the issue persists, submit a ticket to the "support.microchip.com"; along with your complete project; so that Microchip can look into this and fix the issue.
So yeah heres the error code when compiling from my ipad via theos
Making all for bundle iNotitweet...
Compiling iNotitweetController.m...
In file included from iNotitweetController.m:2:
/var/theos/include/Twitter/Twitter.h:7:36: error: _ABAddressBookAddRecord.h: No
such file or directory
In file included from /var/theos/include/Twitter/Twitter.h:9,
from iNotitweetController.m:2:
/var/theos/include/Twitter/NSCoding-Protocol.h:8: warning: duplicate declaration for protocol 'NSCoding'
In file included from iNotitweetController.m:2:
/var/theos/include/Twitter/Twitter.h:13: error: cannot find interface declaration
for '_ABAddressBookAddRecord', superclass of 'Twitter'
iNotitweetController.m: In function '-[iNotitweetController composeTweet]':
iNotitweetController.m:48: error: 'TWTweetComposeViewController' undeclared (first
use in this function)
iNotitweetController.m:48: error: (Each undeclared identifier is reported only once
iNotitweetController.m:48: error: for each function it appears in.)
iNotitweetController.m:48: error: 'twtComposer' undeclared (first use in this
function)
iNotitweetController.m:50: error: expected expression before '^' token
make[2]: *** [obj/iNotitweetController.m.o] Error 1
make[1]: *** [internal-bundle-all_] Error 2
make: *** [iNotitweet.all.bundle.variables] Error 2
im using rpetrich's headers and stole the twitter header from from the freemanrepo on github, could anybody please tell me what these errors mean and where i can find _ABAddressBookAddRecord.h im following this code http://pastebin.com/rArx47Bx and this tutorial http://tumblr.leonnears.com/post/17966636490/create-ncwidget-ios.
Those headers are compatibility headers for old versions of iPhoneOS (even before it was iOS), and I do not recommend the continued use of them - there is no real need to support versions below 4.3.3 anyways (or even 5.0.1), as almost everyone is on at least one of those two firmwares. For the most recent headers, either dump your own from the dyldcache (using kennytm's dyld_decache from here), or you can find the SpringBoard headers for iOS 5 here.
I am getting this error Apple Mach-O Linker error, when I am testing on my iPad.
Although it is working well on simulator.
I have checked all the frameworks, but still the error stays.
Heres what the error says:
ld: library not found for -lz
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I dont understand whats going wrong. Please any ideas.. ?
Appreciate your time in advance
Thanks
Without further info I'd say you have som library only compiled for the simulator not the device.