Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
R15B changes erl_driver API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sergei Golovan  
View profile  
 More options Dec 15 2011, 10:44 am
From: Sergei Golovan <sgolo...@gmail.com>
Date: Thu, 15 Dec 2011 19:44:41 +0400
Local: Thurs, Dec 15 2011 10:44 am
Subject: [erlang-questions] R15B changes erl_driver API
Hi!

Appears that erl_driver API has been changed in R15B. The following
change in erts/emulator/beam/erl_bif_ddll.c (R15B with respect to
R14B04)

--------------------------------------------------------------------------- --------------
     }

     switch (dp->extended_marker) {
-    case 0:
-       /*
-        * This may be an old driver that has been recompiled. If so,
-        * at least the fields that existed in extended driver version
-        * 1.0 should be zero. If not, a it is a bad driver. We cannot
-        * be completely certain that this is a valid driver but this is
-        * the best we can do with old drivers...
-        */
-       if (dp->major_version != 0
-           || dp->minor_version != 0
-           || dp->driver_flags != 0
-           || dp->handle2 != NULL
-           || dp->process_exit != NULL) {
-           /* Old driver; needs to be recompiled... */
-           return ERL_DE_LOAD_ERROR_INCORRECT_VERSION;
-       }
-       break;
     case ERL_DRV_EXTENDED_MARKER:
        if (ERL_DRV_EXTENDED_MAJOR_VERSION != dp->major_version
            || ERL_DRV_EXTENDED_MINOR_VERSION < dp->minor_version) {
--------------------------------------------------------------------------- --------------

makes R15B return error "incorrect driver version" for so-called old
drivers (which don't initialize fields extended_marker, major_version
and minor_version in their ErlDrvEntry structure, or initialize them
as zeros).

As a consequence

1) documentation became incorrect (at least
http://www.erlang.org/doc/man/driver_entry.html where extended_marker
is still allowed to be 0);

2) example from http://www.erlang.org/doc/tutorial/c_portdriver.html
doesn't work anymore;

3) many existing applications break (YAWS and ejabberd definitely, I
suspect many others too, because example in tutorial don't use
extended_marker).

So, will this change be permanent (the documentation and all
applications are to be fixed), or this change will be considered too
disruptive and old drivers will be allowed back in R15B01?

 (By the way, the error message is a bit misleading, especially after
the driver was recompiled using R15B.)

Cheers!
--
Sergei Golovan
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Vinoski  
View profile  
 More options Dec 15 2011, 11:46 am
From: Steve Vinoski <vino...@ieee.org>
Date: Thu, 15 Dec 2011 11:46:07 -0500
Local: Thurs, Dec 15 2011 11:46 am
Subject: Re: [erlang-questions] R15B changes erl_driver API

On Thu, Dec 15, 2011 at 10:44 AM, Sergei Golovan <sgolo...@gmail.com> wrote:

> 3) many existing applications break (YAWS and ejabberd definitely, I
> suspect many others too, because example in tutorial don't use
> extended_marker).

Yaws is already fixed on master at github: https://github.com/klacke/yaws .

--steve
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kenneth Lundin  
View profile  
 More options Dec 15 2011, 12:38 pm
From: Kenneth Lundin <kenneth.lun...@gmail.com>
Date: Thu, 15 Dec 2011 18:38:39 +0100
Local: Thurs, Dec 15 2011 12:38 pm
Subject: Re: [erlang-questions] R15B changes erl_driver API

Den 15 dec 2011 16:45 skrev "Sergei Golovan" <sgolo...@gmail.com>:

> Hi!

> Appears that erl_driver API has been changed in R15B. The following
> change in erts/emulator/beam/erl_bif_ddll.c (R15B with respect to
> R14B04)

This should be no surprise since it is clearly mentioned in the release
highlights and in the Readme file. It is also in the documentation, but as
you point out there might be some remaining issues there, thanks for that.
The change imicrotonal and will stay like this. We thought it was better to
require the use of version number in drivers so that we can detect old
drivers and refuse loading them, rather than just trying to run which might
result in strange errors later during runtime.

> ----

...
/Kenneth, Erlang/OTP Ericsson

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergei Golovan  
View profile  
 More options Dec 15 2011, 12:44 pm
From: Sergei Golovan <sgolo...@gmail.com>
Date: Thu, 15 Dec 2011 21:44:03 +0400
Local: Thurs, Dec 15 2011 12:44 pm
Subject: Re: [erlang-questions] R15B changes erl_driver API
On Thu, Dec 15, 2011 at 9:38 PM, Kenneth Lundin

<kenneth.lun...@gmail.com> wrote:

> This should be no surprise since it is clearly mentioned in the release
> highlights and in the Readme file. It is also in the documentation, but as
> you point out there might be some remaining issues there, thanks for that.
> The change imicrotonal and will stay like this. We thought it was better to
> require the use of version number in drivers so that we can detect old
> drivers and refuse loading them, rather than just trying to run which might
> result in strange errors later during runtime.

I must've missed this in highlights. Ok then, lets fix the applications.

Cheers!
--
Sergei Golovan
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Dec 15 2011, 1:32 pm
From: Zabrane Mickael <zabra...@gmail.com>
Date: Thu, 15 Dec 2011 19:32:31 +0100
Local: Thurs, Dec 15 2011 1:32 pm
Subject: Re: [erlang-questions] R15B changes erl_driver API

Hi guys,

After installing R15B (OSX 10.6.8), this module no longer works for me:
https://github.com/alexeyr/erlang-sqlite3

I got the following error:
[...]
SUPERVISOR REPORT==== 15-Dec-2011::19:27:52 ===
     Supervisor: {local,reactiv_sup}
     Context:    start_error
     Reason:     {{badmatch,{error,"Error loading sqlite3_drv_darwin_64: Driver compiled with incorrect version of erl_driver.h"}},

The driver seems to include the MAJOR/MINOR markers:
https://github.com/alexeyr/erlang-sqlite3/blob/master/c_src/sqlite3_d...

Any Help?

Regards,
Zabrane

On Dec 15, 2011, at 6:38 PM, Kenneth Lundin wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergei Golovan  
View profile  
 More options Dec 15 2011, 1:40 pm
From: Sergei Golovan <sgolo...@gmail.com>
Date: Thu, 15 Dec 2011 22:40:23 +0400
Local: Thurs, Dec 15 2011 1:40 pm
Subject: Re: [erlang-questions] R15B changes erl_driver API

You must rebuild it with Erlang R15B to work.

Cheers!
--
Sergei Golovan
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Dec 15 2011, 1:39 pm
From: Zabrane Mickael <zabra...@gmail.com>
Date: Thu, 15 Dec 2011 19:39:33 +0100
Local: Thurs, Dec 15 2011 1:39 pm
Subject: Re: [erlang-questions] R15B changes erl_driver API
Of course, that's what I did first before posting this error.

On Dec 15, 2011, at 7:40 PM, Sergei Golovan wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Dec 16 2011, 2:30 am
From: Zabrane Mickael <zabra...@gmail.com>
Date: Fri, 16 Dec 2011 08:30:03 +0100
Local: Fri, Dec 16 2011 2:30 am
Subject: Re: [erlang-questions] R15B changes erl_driver API
Hi Andrew,

Works now ... may thanks.
I've also copied the package author.

Regards,
Zabrane

On Dec 16, 2011, at 7:39 AM, Andrew Tunnell-Jones wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexey Romanov  
View profile  
 More options Dec 16 2011, 4:25 am
From: Alexey Romanov <alexey.v.roma...@gmail.com>
Date: Fri, 16 Dec 2011 12:25:22 +0300
Local: Fri, Dec 16 2011 4:25 am
Subject: Re: [erlang-questions] R15B changes erl_driver API
D'oh! Thanks, fixed now.

Yours, Alexey Romanov

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sverker Eriksson  
View profile  
 More options Dec 16 2011, 8:46 am
From: Sverker Eriksson <sver...@erix.ericsson.se>
Date: Fri, 16 Dec 2011 14:46:43 +0100
Local: Fri, Dec 16 2011 8:46 am
Subject: Re: [erlang-questions] R15B changes erl_driver API

> You must rebuild it with Erlang R15B to work.

Not just rebuild:

http://www.erlang.org/doc/man/erl_driver.html#rewrites_for_64_bits

/Sverker, Erlang/OTP

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexey Romanov  
View profile  
 More options Jan 25 2012, 1:17 am
From: Alexey Romanov <alexey.v.roma...@gmail.com>
Date: Wed, 25 Jan 2012 09:17:50 +0300
Local: Wed, Jan 25 2012 1:17 am
Subject: Re: [erlang-questions] R15B changes erl_driver API
Thank you! I'll try to fix it this or next month, when I have time.

Yours, Alexey Romanov

On Fri, Dec 16, 2011 at 5:46 PM, Sverker Eriksson

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tony Rogvall  
View profile  
 More options Jan 25 2012, 8:23 am
From: Tony Rogvall <t...@rogvall.se>
Date: Wed, 25 Jan 2012 14:23:46 +0100
Local: Wed, Jan 25 2012 8:23 am
Subject: Re: [erlang-questions] R15B changes erl_driver API

Hi I am doing some upgrades of drivers right now. I realized that I sometimes need to be able to
compile on pre R15 so I came up with the following scheme in drv_x.c:

#include "erl_driver.h"

// Hack to handle R15 driver used with pre R15 driver
#if ERL_DRV_EXTENDED_MAJOR_VERSION == 1
typedef int  ErlDrvSizeT;
typedef int  ErlDrvSSizeT;
#endif

Then I re-type x_ctl ...

I think this will work, at least for me ? Or will there be a 1.x that breaks this ?

/Tony

On 25 jan 2012, at 07:17, Alexey Romanov wrote:

"Installing applications can lead to corruption over time. Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raimo Niskanen  
View profile  
 More options Jan 25 2012, 8:57 am
From: Raimo Niskanen <raimo+erlang-questi...@erix.ericsson.se>
Date: Wed, 25 Jan 2012 14:57:57 +0100
Local: Wed, Jan 25 2012 8:57 am
Subject: Re: [erlang-questions] R15B changes erl_driver API

No. Between major versions (going forward) it is supposed to suffice
with recompiling.

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »