RejectedSoftware Forums

Sign up

Cannot build simple project

Hello,

I am trying to create a simple website with vibe.d on Linux Mint but I cannot get anything linked with dub. Here is my output:

dave@minty ~/Documents/test $ dub
Checking dependencies in '/home/dave/Documents/test'
Building configuration "application", build type debug
Running dmd (compile)...
Compiling diet template 'index.dt' (compat)...
../../.dub/packages/vibe-d-0.7.16/source/vibe/http/fileserver.d(133): Deprecation: function std.file.dirEntry is deprecated - Please use DirEntry constructor directly instead.
../../.dub/packages/vibe-d-0.7.16/source/vibe/core/file.d(146): Deprecation: function std.file.dirEntry is deprecated - Please use DirEntry constructor directly instead.
../../.dub/packages/vibe-d-0.7.16/source/vibe/core/file.d(146): Deprecation: function std.file.dirEntry is deprecated - Please use DirEntry constructor directly instead.
Linking...
/usr/bin/ld: cannot find -levent
/usr/bin/ld: cannot find -levent_pthreads
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
--- errorlevel 1
Error: Link command failed with exit code 1

Run 'dub help' for usage information.

My directory structure was created by dub init:

.
├── package.json
├── public
├── source
│   └── app.d
└── views
    ├── index.dt
    └── layout.dt

3 directories, 4 files

package.json contains the following:

dave@minty ~/Documents/test $ cat package.json 
{
	"name": "test",
	"description": "An example project skeleton",
	"homepage": "http://example.org",
	"copyright": "Copyright © 2000, Your Name",
	"authors": [
		"Your Name"
	],
	"dependencies": {
            "vibe-d": "~master"
	}
}

A quick look in the /home/dave/.dub/packages folder reveals that all the code has been downloaded, but I cannot find any trace of the .a files although, curiously, I do find win-amd64 and win-i386 folders in the vibe-d-master folder that contains .lib and *.dll.

Clearly I have missed something... Any help would be greatly appreciated :)

/Dave

Re: Cannot build simple project

OK, the penny dropped when I read that you have to install the dependencies yourself on Linux, but I still get linker errors for ssl and crypto.

I have install the openssl package - with the dev version - and the same for libcrypto++9, but I still get linker errors regardless... Suggestions?

/Dave

Re: Cannot build simple project

Hi,

Maybe you can try to add in your package file the libraries that you will be using

"libs": ["openssl","crypto"]

Not sure if the names I've provided for the libraries are correct

On Fri, 09 Aug 2013 12:17:04 GMT, David Brown wrote:

I have install the openssl package - with the dev version - and the same for libcrypto++9, but I still get linker errors regardless... Suggestions?

/Dave

Re: Cannot build simple project

On Fri, 09 Aug 2013 12:17:04 GMT, David Brown wrote:

OK, the penny dropped when I read that you have to install the dependencies yourself on Linux, but I still get linker errors for ssl and crypto.

I have install the openssl package - with the dev version - and the same for libcrypto++9, but I still get linker errors regardless... Suggestions?

/Dave

Can you check what pkg-config --libs openssl outputs? I thought Mint and Ubuntu should be very similar, but maybe there is a difference in this place.

Re: Cannot build simple project

On Sun, 11 Aug 2013 09:29:49 GMT, Sönke Ludwig wrote:

On Fri, 09 Aug 2013 12:17:04 GMT, David Brown wrote:

OK, the penny dropped when I read that you have to install the dependencies yourself on Linux, but I still get linker errors for ssl and crypto.

I have install the openssl package - with the dev version - and the same for libcrypto++9, but I still get linker errors regardless... Suggestions?

/Dave

Can you check what pkg-config --libs openssl outputs? I thought Mint and Ubuntu should be very similar, but maybe there is a difference in this place.

Sure thing. The output is as follows:

dave@minty ~/Documents/test $ pkg-config --libs openssl
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'openssl' found

Which is strange, because I have installed openssl and openssl-dev on my machine, but openssl.pc is nowhere to be found. The only openssl I found is libeventopenssl.[aso] and libeventopenssl.pc. I wonder if these are the Mint equivalents?

On Sat, 10 Aug 2013 22:34:05 GMT, albatroz wrote:

Hi,
Maybe you can try to add in your package file the libraries that you will be using
"libs": ["openssl","crypto"]
Not sure if the names I've provided for the libraries are correct
On Fri, 09 Aug 2013 12:17:04 GMT, David Brown wrote:

I have install the openssl package - with the dev version - and the same for libcrypto++9, but I still get linker errors regardless... Suggestions?
/Dave

Didn't make any noticeable difference I'm afraid, but thanks for the suggestion :)

/Dave

Re: Cannot build simple project

I fighted a few hours on the same problem.

Since you use the mint OS I expect it's the same as Ubuntu and Debian.

I had to install openssl to get libssl and libcrypto installed.
The latest version is 1.0.0 but 0.9.8 is also available.

Since there is no version provided in the libraray dependency I didn't know which one was required.
I just tried libssl-1.0.0 and it worked.

Re: Cannot build simple project

On Fri, 30 Aug 2013 14:53:59 GMT, chmike wrote:

I fighted a few hours on the same problem.

Since you use the mint OS I expect it's the same as Ubuntu and Debian.

I had to install openssl to get libssl and libcrypto installed.
The latest version is 1.0.0 but 0.9.8 is also available.

Since there is no version provided in the libraray dependency I didn't know which one was required.
I just tried libssl-1.0.0 and it worked.

I mean to have to define a symbolic link from libssl.so to libssl-1.0.0.so and the same for the other libraries.
The missing version number is an issue because we have no idea which library version should be used.