Pure-D / workspace-d

CLI deprecated, API + functionality moved into https://github.com/Pure-D/serve-d
MIT License
75 stars 15 forks source link

Build error /usr/bin/ld: cannot find -lcurl #16

Closed llaine closed 8 years ago

llaine commented 8 years ago

Hi,

After several try to install the package it always crashes with the same error.

Performing "release" build using dmd for x86_64.
dub 0.9.25: target for configuration "library" is up to date.
dunit 1.0.12: target for configuration "library" is up to date.
painlesstraits 0.2.0: target for configuration "library" is up to date.
painlessjson 1.3.7: target for configuration "library" is up to date.
workspace-d 2.7.1+commit.3.g3b20935: building configuration "application"...
../../.dub/packages/dub-0.9.25/dub/source/dub/internal/vibecompat/core/file.d(20,15): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
../../.dub/packages/dub-0.9.25/dub/source/dub/internal/sdlang/lexer.d(16,8): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
source/app.d(144,29): Deprecation: workspaced.com.dub.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.core is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.painlessjson is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.workspaced is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.dub is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.BuildIssue is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dub.DubPackageInfo is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.core is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.painlessjson is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.workspaced is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.DCDServerStatus is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.DCDIdentifier is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dcd.DCDSearchResult is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dfmt.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dfmt.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dfmt.core is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dfmt.painlessjson is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dfmt.workspaced is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.core is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.painlessjson is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.workspaced is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.DScannerIssue is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.OutlineTreeNode is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dscanner.DefinitionElement is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.core is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.painlessjson is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.workspaced is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.LocationType is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.dlangui.LocationInfo is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.fsworkspace.object is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.fsworkspace.std is not visible from module app
source/app.d(144,29): Deprecation: workspaced.com.fsworkspace.workspaced is not visible from module app
Linking...
/usr/bin/ld: cannot find -lcurl
collect2: erreur : ld a retourné 1 code d'état d'exécution
--- errorlevel 1
dmd failed with exit code 1.

DMd version : 2.071.0 Dub version : 0.9.25

Vild commented 8 years ago

Seems like you don't have curl installed. Please install cur` and then try again.

llaine commented 8 years ago

Hi,

I do have curl installed that the problem ...

[llaine@localhost ~] $ curl --version
curl 7.43.0 (x86_64-redhat-linux-gnu) libcurl/7.43.0 NSS/3.22 Basic ECC zlib/1.2.8 libidn/1.32 libssh2/1.6.0 nghttp2/1.7.1

OS : Fedora 23 x86-64 with kernel 4.4.9-300

WebFreak001 commented 8 years ago

You need libcurl: ls /usr/lib | grep curl

llaine commented 8 years ago

Looks like this is already installed too

[llaine@localhost ~] $ ls /usr/lib | grep curl
libcurl.so.4
libcurl.so.4.3.0
Vild commented 8 years ago

Looks like you are missing a symlink for your curl. This should fix it via a hacky fix: sudo ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl.so

Vild commented 8 years ago

Do you have libcurl-devel installed? This should fix it, without that hacky symlink hack.

llaine commented 8 years ago

I tried your hacky fix, unfortunatly it didn't work

Linking...
/usr/bin/ld: escamotage incompatible /usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../libcurl.so lors de la recherche de -lcurl
/usr/bin/ld: escamotage incompatible /lib/libcurl.so lors de la recherche de -lcurl
/usr/bin/ld: escamotage incompatible /usr/lib/libcurl.so lors de la recherche de -lcurl
/usr/bin/ld: ne peut trouver -lcurl
Vild commented 8 years ago

Looks like installing libcurl-devel should fix it.

llaine commented 8 years ago

@Vild installing the missing dependency solved the problem just fine!

But then another error message appear during the compilation, after running

dub build --build=release

src/analysis/lambda_return_check.d(40,29): Error: no property 'line' for type 'const(FunctionLiteralExpression)'
src/analysis/lambda_return_check.d(40,40): Error: no property 'column' for type 'const(FunctionLiteralExpression)'
dmd failed with exit code 1.
Error while compiling Dscanner.
Program exited with code 1
WebFreak001 commented 8 years ago

dmd --version?

llaine commented 8 years ago

DMD64 D Compiler v2.071.0

WebFreak001 commented 8 years ago

Wait Dscanner? You sure you didn't accidentally switch projects?

llaine commented 8 years ago

Well to be honest I'm trying to build the https://github.com/Pure-D/workspace-d-installer. Whether I tried to compile this one or the other (workspace-d-installer) I get the same issue so ... But I guess it's related no?

WebFreak001 commented 8 years ago

Related to https://github.com/Hackerpilot/Dscanner/issues/350, until that is fixed the installer won't work

WebFreak001 commented 8 years ago

Hacky Fix: select 1,3 instead of all on installation instead

llaine commented 8 years ago

It worked thank you @WebFreak001

dAnjou commented 7 years ago

The dependency on libcurl-devel should be mentioned in the README.

Nguyenvandoi commented 6 years ago

You need install libcurl3-dev package sudo apt-get install libcurl3-dev or sudo apt-get install libmosquittopp-dev

WebFreak001 commented 6 years ago

you certainly don't need to install a full MQTT broker, just libcurl3-dev is enough.

That said this issue doesn't really apply anymore as you don't need dfmt or dscanner anymore