Issue Details (XML | Word | Printable)

Key: CORE-2825
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Damyan Ivanov
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

some patches for building on Debian/kFreeBSD and FreeBSD

Created: 23/Jan/10 08:48 PM   Updated: 24/May/16 03:56 PM
Component/s: Build Issues / Porting
Affects Version/s: 2.5 RC1
Fix Version/s: 2.5 RC3, 3.0 Alpha 1

File Attachments: 1. Text File freebsd-mutex-sysv.patch (0.7 kB)
2. Text File freebsd_targets.patch (0.7 kB)
3. Text File install_freebsd_as_linux.patch (1 kB)
4. Text File install_freebsd_as_linux.patch (1 kB)
5. Text File optional_posix_fadv.patch (0.9 kB)

Environment: Debian/kFreeBSD

QA Status: Cannot be tested

 Description  « Hide
I had to apply the following patches in order to make Firebird 2.5 RC1. Some are specific for the Debian/kFreeBSD architecture (that is GNU userland plus Debian package management over FreeBSD kernel), others are relevant for plain FreeBSD too.

freebsd-mutex-sysv.patch - makes mutex code use SYSV semaphores for mutexes on FreeBSD (same as DARWIN)

optional_posix_fadv.patch: use advisory posix features only when available. apparently the POSIX_FADV_* constants are not available on Debian/kFreeBSD

install_freebsd_as_linux.patch: use linux install makefile on k*BSD; the 'normal' freebsd install makefile misses the image/tar building targets

freebsd_targets.patch: fixes Makefile targets on FreeBSD. The current prefix file misses the fbsvcmgr and fbtracemgr targets

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Damyan Ivanov added a comment - 23/Jan/10 08:51 PM
The FreeBSD kernel does not support process-shared mutexes. This match makes firebird use System V semaphores instead, similarly to Darwin (which is based on FreeBSD)

Damyan Ivanov added a comment - 23/Jan/10 08:55 PM
nbackup uses advisoru file fcntl in order to hint the OS in order to optimize the file access for sequential, one time reading. unfortunately the POSIX_FADV_* defines are not presend on Debian/kFreeBSD even of the function itself is present.

This patch makes advisory fcntl usage dependent on prresence of the respective POSIX_FADV_* defines.

Damyan Ivanov added a comment - 23/Jan/10 09:01 PM
FreeBSD's install makefile follows a different route than the Linux one and does not provide image/tar building targets.

This is a problem for the Debian/kFreeBSD package, because there is no way to create an isolated "install" .

Unfortunately I have no access to a "pure" FreeBSD so I can't say whether the patch is appropriate there.

Damyan Ivanov added a comment - 23/Jan/10 09:02 PM
add the missing fbsvcmgr and fbtracemgr targets to the freebsd prefix file.

Damyan Ivanov added a comment - 25/Jan/10 09:03 AM
The previous version of install_freebsd_as_linux.patch didn't work as expected on kfreebsd-amd64