Re: [Fink-devel] Help with shlib

2017-07-09 Thread Hanspeter Niederstrasser

On 7/9/17 1:03 PM, Scott Hannahs wrote:



On Jun 26, 2017, at 11:46 AM, Alexander Hansen  
wrote:


On Jun 25, 2017, at 17:39, Scott Hannahs  wrote:

So do I need to modify the install phase to install the 
/sw/lib/libcryptopp.5.dylib file?  Should it be a hard link to the 
libcryptopp.dylib or should that file not exist.



The preferred option is actually the reverse:  real libcryptopp.5.dylib with 
libcryptopp.dylib as a symbolic link.


When there are two split off packages, I think I have the following
all packages: Install.txt License.txt Readme.txt in share/doc/libcryptopp5
package: cryptest.exe in /bin  testdata in share/libcryptopp/ headers in 
include/libcryptopp
package-shlib: lib/libcryptopp.5.dylib and libcryptopp.dylib (and maybe 
libcryptopp.a but I think I can delete it??)


Ideally, package-shlibs should only contain the shared library/libraries and 
the DocFiles you noted earlier.


package-dev: headers in include/libcryptopp


If libcryptopp.dylib is a symlink as I suggested above, it needs to go here.  
This structure helps us to have multiple versions of the library available for 
builds, since by swapping the -dev package we can change what -lFOO on a build 
line really points to.

Moving rather than is intentional, since you aren’t supposed to have the same 
file provided by multiple splitoffs in a package build.  We’d wind up with 
files duplicated between the main package and splitoffs, or we’d have to go 
back and delete them after the fact.

Make sure that you didn’t declare it in multiple Files lines, and otherwise 
check what’s actually in the directory.


I seem to still be missing something essential here.  I have separated the 
symbolic link to the -dev split off and renamed the package to contain the 
major version number.

I can’t seem to get a match between the shilib and the file name.  I have set 
it up so that the symbolic link gets made and then installed by the -dev split 
off.  But the deb package does not pass the test.  I am having a match problem 
for the files: and shilibs: fields.

I have tried various different prefixes and relative and absolute paths but 
still do not seem to get a clean DEB file.  I have used as templates some of 
the other .info files in lib.  Such as canna.info and lhasa.info.

Currently I get a mismatch:

Validating .deb dir /sw/src/fink.build/root-libcryptopp5-shlibs-5.6.5-23...
Error: Name '/sw/lib/libcryptopp.5.dylib' specified in Shlibs does not match 
install_name 
'/sw/src/fink.build/root-libcryptopp5-5.6.5-23/sw/lib/libcryptopp.5.dylib'
Error: package contains the shared library
   /sw/lib/libcryptopp.5.dylib
but the corresponding install_name and compatibility_version
   
%p/src/fink.build/root-libcryptopp5-5.6.5-23/sw/lib/libcryptopp.5.dylib 5.6.0
are not listed in the Shlibs field.  See the packaging manual.


The real libcryptopp.5.dylib file needs to have its install_name fixed 
(this is a bug in upstream's makefile). You can either edit the Makefile 
to do it properly, or run install_name_tool at the end of InstallScript: 
to give it the proper install_name. The command for the latter option 
would be something like:


install_name_tool -id %p/lib/libcryptopp.5.dylib %i/lib/libcryptopp.5.dylib

This fixes the file in "%i/lib/libcryptopp.5.dylib" to have an 
install_name of "%p/lib/libcryptopp.5.dylib".


What files are in the base libcryptopp5 package? If there are any 
executables, you need to make sure they show linkage (via otool -L) to 
the file in %p and not the file in %i. If there are files there that 
link to the library, it might be easier to fix the build process than to 
fix the results after the build.


Hanspeter

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Re: [Fink-devel] Help with shlib

2017-07-09 Thread Scott Hannahs

> On Jun 26, 2017, at 11:46 AM, Alexander Hansen  
> wrote:
> 
>> On Jun 25, 2017, at 17:39, Scott Hannahs  wrote:
>> 
>> So do I need to modify the install phase to install the 
>> /sw/lib/libcryptopp.5.dylib file?  Should it be a hard link to the 
>> libcryptopp.dylib or should that file not exist.
>> 
> 
> The preferred option is actually the reverse:  real libcryptopp.5.dylib with 
> libcryptopp.dylib as a symbolic link.  
> 
>> When there are two split off packages, I think I have the following
>> all packages: Install.txt License.txt Readme.txt in share/doc/libcryptopp5
>> package: cryptest.exe in /bin  testdata in share/libcryptopp/ headers in 
>> include/libcryptopp
>> package-shlib: lib/libcryptopp.5.dylib and libcryptopp.dylib (and maybe 
>> libcryptopp.a but I think I can delete it??)
> 
> Ideally, package-shlibs should only contain the shared library/libraries and 
> the DocFiles you noted earlier.
> 
>> package-dev: headers in include/libcryptopp
> 
> If libcryptopp.dylib is a symlink as I suggested above, it needs to go here.  
> This structure helps us to have multiple versions of the library available 
> for builds, since by swapping the -dev package we can change what -lFOO on a 
> build line really points to.
> 
> Moving rather than is intentional, since you aren’t supposed to have the same 
> file provided by multiple splitoffs in a package build.  We’d wind up with 
> files duplicated between the main package and splitoffs, or we’d have to go 
> back and delete them after the fact.
> 
> Make sure that you didn’t declare it in multiple Files lines, and otherwise 
> check what’s actually in the directory.

I seem to still be missing something essential here.  I have separated the 
symbolic link to the -dev split off and renamed the package to contain the 
major version number.

I can’t seem to get a match between the shilib and the file name.  I have set 
it up so that the symbolic link gets made and then installed by the -dev split 
off.  But the deb package does not pass the test.  I am having a match problem 
for the files: and shilibs: fields.

I have tried various different prefixes and relative and absolute paths but 
still do not seem to get a clean DEB file.  I have used as templates some of 
the other .info files in lib.  Such as canna.info and lhasa.info.

Currently I get a mismatch:

Validating .deb dir /sw/src/fink.build/root-libcryptopp5-shlibs-5.6.5-23...
Error: Name '/sw/lib/libcryptopp.5.dylib' specified in Shlibs does not match 
install_name 
'/sw/src/fink.build/root-libcryptopp5-5.6.5-23/sw/lib/libcryptopp.5.dylib'
Error: package contains the shared library
  /sw/lib/libcryptopp.5.dylib
   but the corresponding install_name and compatibility_version
  
%p/src/fink.build/root-libcryptopp5-5.6.5-23/sw/lib/libcryptopp.5.dylib 5.6.0
   are not listed in the Shlibs field.  See the packaging manual.

at the moment I have the following fields in the split off
   InstallScript: make install PREFIX=%p DESTDIR=%d

SplitOff: <<
   Package: %N-shlibs
   DocFiles: Install.txt License.txt Readme.txt
   Files: lib/libcryptopp.5.dylib
   Shlibs: %p/lib/libcryptopp.5.dylib 5.6.0 %n (>= 5.6.5-5)
<<

SplitOff2: <<
   Package: %N-dev
   Depends: %N-shlibs (= %v-%r)
   BuildDependsOnly: true
   Files: <<
  include
  lib/libcryptopp.dylib
  lib/libcryptopp.a
   <<
<<

And now I realize I am just flailing around here…. :-)

So what is the correct location for my 3 files and how do I reference them in 
the two split offs for the -shlibs and -dev portions of the fink file.

The three files are in the main build directory and are
libcryptopp.5.dylib
libcryptopp.dylib (a symbolic link to the file above)
libcryptopp.a (the static version)

The root-libcryptopp5-shlibs-5.6.5-23 and root-libcryptopp5-dev-5.6.5-23 
folders look like they have all the right files in the the right parts of the 
sw directory.

So the Files: tag should be a relative path.  The Shlibs: tag has to be an 
absolute path.  But… the deb file is not matching the index.  I seem to just be 
testing all combinations here and not hitting the right one.  The examples in 
the lib/*.info files all seem to use %p, but the documentation suggests to me 
that %I would be the correct (or %D%P).

-Scott



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Re: [Fink-devel] Help with shlib

2017-06-26 Thread Alexander Hansen

> On Jun 25, 2017, at 17:39, Scott Hannahs  wrote:
> 
>> 
>> On Jun 25, 2017, at 7:27 AM, Hanspeter Niederstrasser 
>>  wrote:
>> 
>> On 6/24/17 5:19 PM, Scott Hannahs via Fink-devel wrote:
>>> I need a bit of help with a fink package.  I don’t fully understand the 
>>> Shlibs: tag in a fink package.  I am trying to create a package for a 
>>> dynamic library.  The library builds correctly.  However it just builds the 
>>> library as cryptopp.dylib in the midst of the source files.
>>> The discussion of the SHLIBS tag in the packaging manual seems a bit 
>>> obscure to me.
>>> Here is the relevant part of the package as I have it now following another 
>>> library package as a template.
>>> NoSourceDirectory: True
>>> CompileScript: make dynamic
>>> InfoTest: <<
>>>  TestScript: make test || exit2
>>> <<
>>> DocFiles: Install.txt License.txt Readme.txt
>>> InstallScript: make install PREFIX=%i
>>> SplitOff: <<
>>>   Package: %N-shlibs
>>>   Files: <<
>>>  lib/libcryptopp.dylib
>>><<
>>>   Shlibs: <<
>>>  %p/lib/libcryptopp.dylib 5.6.0 %n (>= 5.6.5-5)
>>>   <<
>>> <<
>>> SplitOff2: <<
>>>   Package: %N-dev
>>>   Depends: %N-shlibs (= %v-%r)
>>>   BuildDependsOnly: true
>>>   Files: <<
>>>  include
>>>   <<
>>> <<
>>> the package goes and build both the dylib and .a libraries, but has a 
>>> problem installing them.  The deb file does not pass authentication when I 
>>> run fink in -m mode.
>>> When I try to build with the -km flags, I get the following:
>>> Validating .deb dir /sw/src/fink.build/root-libcryptopp-shlibs-5.6.5-13...
>>> Error: Name '/sw/lib/libcryptopp.dylib' specified in Shlibs does not match 
>>> install_name 
>>> '/sw/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib'
>>> Error: package contains the shared library
>>>  /sw/lib/libcryptopp.dylib
>>>   but the corresponding install_name and compatibility_version
>>>  
>>> %p/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib 5.6.0
>>>   are not listed in the Shlibs field.  See the packaging manual.
>> 
>> Your Shlibs: field is OK given what the library is giving you, but the 
>> problem is that upstream is not handling their library in a useful way.
>> 
>> 1) Their library is not versioned. It is named 'librcrypto.dylib', but 
>> should be 'libcrypto.N.dylib', where N is the library version (not 
>> necessarily the zipfile version). This can be fixed by modifying the 
>> makefile and adding $(LIB_MAJOR) to the install_name bits.
>> 
>> 2) The makefile uses install_name_tool to change the install name of the 
>> library but uses $(DESTDIR) badly in setting the new -id of the library. 
>> This incorrectly adds the whole 'src/fink.build/root-...' mess to the 
>> install_name. Fix the makefile to only use LIBDIR when setting the 
>> install_name for the library. And tell upstream, because that is a basic 
>> error.
>> 
>> 3) As far as I can tell, the Makefile fully supports DESTDIR, so you're 
>> probably better off using both DESTDIR=%d and PREFIX=%p in the install 
>> command (and not PREFIX=%i).
>> 
>> 4) Fink convention is that if your library is libcryptopp.5.dylib, your 
>> package should be libcryptopp5-shlibs and libcryptopp5-dev. The base package 
>> (if non-library) can stay libcryptopp (no 5).
>> 
>> Hanspeter
> 
> Thanks, I have attempted this but I am not sure I understand what the 
> install_name_tool actually does.  I don’t think that it creates the 
> ‘libcryptopp.N.dylib’ files themselves?  But sets an internal name?
> 

Correct.  

> Should I set the name to the correct ‘libcryptopp.N.dylib’ after the build 
> and before the install?
> 

You can even set it at the end of the install phase (i.e. somewhere in the 
InstallScript).  

> So do I need to modify the install phase to install the 
> /sw/lib/libcryptopp.5.dylib file?  Should it be a hard link to the 
> libcryptopp.dylib or should that file not exist.
> 

The preferred option is actually the reverse:  real libcryptopp.5.dylib with 
libcryptopp.dylib as a symbolic link.  

> When there are two split off packages, I think I have the following
> all packages: Install.txt License.txt Readme.txt in share/doc/libcryptopp5
> package: cryptest.exe in /bin  testdata in share/libcryptopp/ headers in 
> include/libcryptopp
> package-shlib: lib/libcryptopp.5.dylib and libcryptopp.dylib (and maybe 
> libcryptopp.a but I think I can delete it??)

Ideally, package-shlibs should only contain the shared library/libraries and 
the DocFiles you noted earlier.

> package-dev: headers in include/libcryptopp

If libcryptopp.dylib is a symlink as I suggested above, it needs to go here.  
This structure helps us to have multiple versions of the library available for 
builds, since by swapping the -dev package we can change what -lFOO on a build 
line really points to.
 
> 
> for some reason it tries to move instead of copy and it fails creating the 
> shlibs folder structure.
> 

Re: [Fink-devel] Help with shlib

2017-06-25 Thread Scott Hannahs

> On Jun 25, 2017, at 7:27 AM, Hanspeter Niederstrasser 
>  wrote:
> 
> On 6/24/17 5:19 PM, Scott Hannahs via Fink-devel wrote:
>> I need a bit of help with a fink package.  I don’t fully understand the 
>> Shlibs: tag in a fink package.  I am trying to create a package for a 
>> dynamic library.  The library builds correctly.  However it just builds the 
>> library as cryptopp.dylib in the midst of the source files.
>> The discussion of the SHLIBS tag in the packaging manual seems a bit obscure 
>> to me.
>> Here is the relevant part of the package as I have it now following another 
>> library package as a template.
>> NoSourceDirectory: True
>> CompileScript: make dynamic
>> InfoTest: <<
>>   TestScript: make test || exit2
>> <<
>> DocFiles: Install.txt License.txt Readme.txt
>> InstallScript: make install PREFIX=%i
>> SplitOff: <<
>>Package: %N-shlibs
>>Files: <<
>>   lib/libcryptopp.dylib
>> <<
>>Shlibs: <<
>>   %p/lib/libcryptopp.dylib 5.6.0 %n (>= 5.6.5-5)
>><<
>> <<
>> SplitOff2: <<
>>Package: %N-dev
>>Depends: %N-shlibs (= %v-%r)
>>BuildDependsOnly: true
>>Files: <<
>>   include
>><<
>> <<
>> the package goes and build both the dylib and .a libraries, but has a 
>> problem installing them.  The deb file does not pass authentication when I 
>> run fink in -m mode.
>> When I try to build with the -km flags, I get the following:
>> Validating .deb dir /sw/src/fink.build/root-libcryptopp-shlibs-5.6.5-13...
>> Error: Name '/sw/lib/libcryptopp.dylib' specified in Shlibs does not match 
>> install_name 
>> '/sw/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib'
>> Error: package contains the shared library
>>   /sw/lib/libcryptopp.dylib
>>but the corresponding install_name and compatibility_version
>>   
>> %p/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib 5.6.0
>>are not listed in the Shlibs field.  See the packaging manual.
> 
> Your Shlibs: field is OK given what the library is giving you, but the 
> problem is that upstream is not handling their library in a useful way.
> 
> 1) Their library is not versioned. It is named 'librcrypto.dylib', but should 
> be 'libcrypto.N.dylib', where N is the library version (not necessarily the 
> zipfile version). This can be fixed by modifying the makefile and adding 
> $(LIB_MAJOR) to the install_name bits.
> 
> 2) The makefile uses install_name_tool to change the install name of the 
> library but uses $(DESTDIR) badly in setting the new -id of the library. This 
> incorrectly adds the whole 'src/fink.build/root-...' mess to the 
> install_name. Fix the makefile to only use LIBDIR when setting the 
> install_name for the library. And tell upstream, because that is a basic 
> error.
> 
> 3) As far as I can tell, the Makefile fully supports DESTDIR, so you're 
> probably better off using both DESTDIR=%d and PREFIX=%p in the install 
> command (and not PREFIX=%i).
> 
> 4) Fink convention is that if your library is libcryptopp.5.dylib, your 
> package should be libcryptopp5-shlibs and libcryptopp5-dev. The base package 
> (if non-library) can stay libcryptopp (no 5).
> 
> Hanspeter

Thanks, I have attempted this but I am not sure I understand what the 
install_name_tool actually does.  I don’t think that it creates the 
‘libcryptopp.N.dylib’ files themselves?  But sets an internal name?

Should I set the name to the correct ‘libcryptopp.N.dylib’ after the build and 
before the install?

So do I need to modify the install phase to install the 
/sw/lib/libcryptopp.5.dylib file?  Should it be a hard link to the 
libcryptopp.dylib or should that file not exist.

When there are two split off packages, I think I have the following
all packages: Install.txt License.txt Readme.txt in share/doc/libcryptopp5
package: cryptest.exe in /bin  testdata in share/libcryptopp/ headers in 
include/libcryptopp
package-shlib: lib/libcryptopp.5.dylib and libcryptopp.dylib (and maybe 
libcryptopp.a but I think I can delete it??)
package-dev: headers in include/libcryptopp

for some reason it tries to move instead of copy and it fails creating the 
shlibs folder structure.

/bin/mv /sw/src/fink.build/root-libcryptopp5-5.6.5-16/sw/lib/libcryptopp.dylib 
/sw/src/fink.build/root-libcryptopp5-shlibs-5.6.5-16/sw/lib/
mv: rename 
/sw/src/fink.build/root-libcryptopp5-5.6.5-16/sw/lib/libcryptopp.dylib to 
/sw/src/fink.build/root-libcryptopp5-shlibs-5.6.5-16/sw/lib/libcryptopp.dylib: 
No such file or directory

-Scott



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:

Re: [Fink-devel] Help with shlib

2017-06-25 Thread Hanspeter Niederstrasser

On 6/24/17 5:19 PM, Scott Hannahs via Fink-devel wrote:

I need a bit of help with a fink package.  I don’t fully understand the Shlibs: 
tag in a fink package.  I am trying to create a package for a dynamic library.  
The library builds correctly.  However it just builds the library as 
cryptopp.dylib in the midst of the source files.

The discussion of the SHLIBS tag in the packaging manual seems a bit obscure to 
me.

Here is the relevant part of the package as I have it now following another 
library package as a template.

NoSourceDirectory: True
CompileScript: make dynamic
InfoTest: <<
   TestScript: make test || exit2
<<
DocFiles: Install.txt License.txt Readme.txt
InstallScript: make install PREFIX=%i
SplitOff: <<
Package: %N-shlibs
Files: <<
   lib/libcryptopp.dylib
 <<
Shlibs: <<
   %p/lib/libcryptopp.dylib 5.6.0 %n (>= 5.6.5-5)
<<
<<
SplitOff2: <<
Package: %N-dev
Depends: %N-shlibs (= %v-%r)
BuildDependsOnly: true
Files: <<
   include
<<
<<

the package goes and build both the dylib and .a libraries, but has a problem 
installing them.  The deb file does not pass authentication when I run fink in 
-m mode.

When I try to build with the -km flags, I get the following:

Validating .deb dir /sw/src/fink.build/root-libcryptopp-shlibs-5.6.5-13...
Error: Name '/sw/lib/libcryptopp.dylib' specified in Shlibs does not match 
install_name 
'/sw/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib'
Error: package contains the shared library
   /sw/lib/libcryptopp.dylib
but the corresponding install_name and compatibility_version
   %p/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib 
5.6.0
are not listed in the Shlibs field.  See the packaging manual.


Your Shlibs: field is OK given what the library is giving you, but the 
problem is that upstream is not handling their library in a useful way.


1) Their library is not versioned. It is named 'librcrypto.dylib', but 
should be 'libcrypto.N.dylib', where N is the library version (not 
necessarily the zipfile version). This can be fixed by modifying the 
makefile and adding $(LIB_MAJOR) to the install_name bits.


2) The makefile uses install_name_tool to change the install name of the 
library but uses $(DESTDIR) badly in setting the new -id of the library. 
This incorrectly adds the whole 'src/fink.build/root-...' mess to the 
install_name. Fix the makefile to only use LIBDIR when setting the 
install_name for the library. And tell upstream, because that is a basic 
error.


3) As far as I can tell, the Makefile fully supports DESTDIR, so you're 
probably better off using both DESTDIR=%d and PREFIX=%p in the install 
command (and not PREFIX=%i).


4) Fink convention is that if your library is libcryptopp.5.dylib, your 
package should be libcryptopp5-shlibs and libcryptopp5-dev. The base 
package (if non-library) can stay libcryptopp (no 5).


Hanspeter

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Re: [Fink-devel] Help with shlib

2017-06-25 Thread Alexander Hansen

> On Jun 24, 2017, at 15:19, Scott Hannahs via Fink-devel 
>  wrote:
> 
> I need a bit of help with a fink package.  I don’t fully understand the 
> Shlibs: tag in a fink package.  I am trying to create a package for a dynamic 
> library.  The library builds correctly.  However it just builds the library 
> as cryptopp.dylib in the midst of the source files.
> 
> The discussion of the SHLIBS tag in the packaging manual seems a bit obscure 
> to me.
> 
> Here is the relevant part of the package as I have it now following another 
> library package as a template.
> 
> NoSourceDirectory: True
> CompileScript: make dynamic
> InfoTest: <<
>  TestScript: make test || exit2
> <<
> DocFiles: Install.txt License.txt Readme.txt
> InstallScript: make install PREFIX=%i
> SplitOff: <<
>   Package: %N-shlibs
>   Files: <<
>  lib/libcryptopp.dylib
><<
>   Shlibs: <<
>  %p/lib/libcryptopp.dylib 5.6.0 %n (>= 5.6.5-5)
>   <<
> <<
> SplitOff2: <<
>   Package: %N-dev
>   Depends: %N-shlibs (= %v-%r)
>   BuildDependsOnly: true
>   Files: <<
>  include
>   <<
> <<
> 
> the package goes and build both the dylib and .a libraries, but has a problem 
> installing them.  The deb file does not pass authentication when I run fink 
> in -m mode.
> 
> When I try to build with the -km flags, I get the following:
> 
> Validating .deb dir /sw/src/fink.build/root-libcryptopp-shlibs-5.6.5-13...
> Error: Name '/sw/lib/libcryptopp.dylib' specified in Shlibs does not match 
> install_name 
> '/sw/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib'
> Error: package contains the shared library
>  /sw/lib/libcryptopp.dylib
>   but the corresponding install_name and compatibility_version
>  %p/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib 
> 5.6.0
>   are not listed in the Shlibs field.  See the packaging manual.
> 
> 
> Any help is of course very much appreciated!
> Scott
> 
> Dr. Scott Hannahs, Director of Scientific Instrumentation and Operations
> Distinguished University Scholar
> National High Magnetic Field Laboratory, Florida State University
> http://sthmac.magnet.fsu.edu
> 1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX 644-0534
> 
>   "OS X: because making Unix user-friendly was easier than debugging 
> Windows."
> 
> 
> -

What’s going on here is that the package's build system has encoded the install 
directory location /sw/src/fink.build/root-libcryptopp-5.6.5-13/  into the 
binary.  That’s not going to work. 

You’ll need to use “install_name_tool -id %p/lib/libcryptopp.dylib 
%i/lib/libcryptopp.dylib” to change that.

-- 
Alexander Hansen, Ph.D.
Fink User Liaison


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

[Fink-devel] Help with shlib

2017-06-24 Thread Scott Hannahs via Fink-devel
I need a bit of help with a fink package.  I don’t fully understand the Shlibs: 
tag in a fink package.  I am trying to create a package for a dynamic library.  
The library builds correctly.  However it just builds the library as 
cryptopp.dylib in the midst of the source files.

The discussion of the SHLIBS tag in the packaging manual seems a bit obscure to 
me.

Here is the relevant part of the package as I have it now following another 
library package as a template.

NoSourceDirectory: True
CompileScript: make dynamic
InfoTest: <<
  TestScript: make test || exit2
<<
DocFiles: Install.txt License.txt Readme.txt
InstallScript: make install PREFIX=%i
SplitOff: <<
   Package: %N-shlibs
   Files: <<
  lib/libcryptopp.dylib
<<
   Shlibs: <<
  %p/lib/libcryptopp.dylib 5.6.0 %n (>= 5.6.5-5)
   <<
<<
SplitOff2: <<
   Package: %N-dev
   Depends: %N-shlibs (= %v-%r)
   BuildDependsOnly: true
   Files: <<
  include
   <<
<<

the package goes and build both the dylib and .a libraries, but has a problem 
installing them.  The deb file does not pass authentication when I run fink in 
-m mode.

When I try to build with the -km flags, I get the following:

Validating .deb dir /sw/src/fink.build/root-libcryptopp-shlibs-5.6.5-13...
Error: Name '/sw/lib/libcryptopp.dylib' specified in Shlibs does not match 
install_name 
'/sw/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib'
Error: package contains the shared library
  /sw/lib/libcryptopp.dylib
   but the corresponding install_name and compatibility_version
  %p/src/fink.build/root-libcryptopp-5.6.5-13/sw/lib/libcryptopp.dylib 
5.6.0
   are not listed in the Shlibs field.  See the packaging manual.


Any help is of course very much appreciated!
Scott

Dr. Scott Hannahs, Director of Scientific Instrumentation and Operations
Distinguished University Scholar
National High Magnetic Field Laboratory, Florida State University
http://sthmac.magnet.fsu.edu
1800 E. Paul Dirac Dr., Tallahassee FL 32310, (850)644-0216/FAX 644-0534

"OS X: because making Unix user-friendly was easier than debugging 
Windows."


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
https://sourceforge.net/p/fink/mailman/fink-devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel