This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3359: Unable to compile TI gbm variant

Part Number: AM3359


Tool/software: Linux

I am building a lightweight Linux kernel that includes only the most basic SGX graphics capabilities. I have everything working with one exception. I still have to copy the libgbm binaries from the processor SDK build because mine do not work correctly. Whenever I call gbm_surface_create, I get a segmentation fault. When I use the version from the TI processor SDK output (Yocto), everything works fine.

git.ti.com/.../96f37555c7e82a417b02051661377b10e6b3966e

When building libgbm, are there any additional configuration steps that I need to take beyond running autogen.sh?

# /etc/init.d/rc.pvr start
[   21.711516] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
Loaded PowerVR consumer services.
# kmscube
trying to load module omapdrm...failed.
trying to load module tilcdc...success.
### Display [0]: CRTC = 24, Connector = 26, format = 0x34325258
        Mode chosen [800x480] : Clock => 45000, Vertical refresh => 92, Type => 72
        Horizontal => 800, 840, 888, 928, 0
        Vertical => 480, 493, 496, 525, 0
### Primary display => ConnectorId = 26, Resolution = 800x480
Initializing GBM...
gbm_create_device
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
gbm_surface_create
Segmentation fault

My buildroot makefile is listed below

################################################################################
#
# ti-gbm
#
################################################################################

# This correpsonds to TI processor SDK 04.01.00
TI_GBM_VERSION = 96f37555c7e82a417b02051661377b10e6b3966e    
TI_GBM_SITE = git://git.ti.com/glsdk/libgbm.git
TI_GBM_LICENSE = MIT
TI_GBM_DEPENDENCIES = libdrm udev
TI_GBM_INSTALL_STAGING = YES
TT_GBM_INSTALL_TARGET = YES
TI_GBM_AUTORECONF = YES
TI_GBM_AUTORECONF_OPTS = -v --install
TI_GBM_CONF_OPTS = --enable-maintainer-mode

define TI_GBM_MAKE_SYMLINK
	mkdir $(TARGET_DIR)/usr/lib/gbm
	ln -sf ../libpvrGBMWSEGL.so.1.14.3699939 $(TARGET_DIR)/usr/lib/gbm/gbm_pvr.so
endef

TI_GBM_POST_INSTALL_TARGET_HOOKS += TI_GBM_MAKE_SYMLINK

$(eval $(autotools-package))

  • Hello Kyle,

    Please, see this solution.

    Best regards,
    Kemal

  • Hello Kemal,

    Does it matter whether gbm_pvr.so is placed in /lib/gbm or /usr/lib/gbm? The TI-SDK build places it in /usr/lib/gbm, but the given solution has it placed in /lib/gbm.

    Apart from that, I cannot see any difference between the given solution and my own build. The "export QT_QPA_EGLFS_INTEGRATION=none" should not affect me since I am not using QT.

  • I have also included my ti-sgx-km and ti-sgx-um buildroot .mk files

    ################################################################################
    #
    # ti-sgx-km
    #
    ################################################################################
    
    # This correpsonds to SDK 04.01.00
    TI_SGX_KM_VERSION = 0086977380d3320d70a3abc78b95fa0641427073    
    TI_SGX_KM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-linux.git
    TI_SGX_KM_LICENSE = GPL-2.0
    TI_SGX_KM_LICENSE_FILES = GPL-COPYING
    
    TI_SGX_KM_DEPENDENCIES = linux
    
    TI_SGX_KM_MAKE_OPTS = \
    	$(LINUX_MAKE_FLAGS) \
    	TARGET_PRODUCT=ti335x
    
    TI_SGX_KM_SUBDIR = eurasia_km/eurasiacon/build/linux2/omap_linux
    
    define TI_SGX_KM_BUILD_CMDS
    	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
    		-C $(@D)/$(TI_SGX_KM_SUBDIR)
    endef
    
    define TI_SGX_KM_INSTALL_TARGET_CMDS
    	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \
    		DISCIMAGE=$(TARGET_DIR) \
    		kbuild_install -C $(@D)/$(TI_SGX_KM_SUBDIR)
    endef
    
    $(eval $(generic-package))

    ################################################################################
    #
    # ti-sgx-um
    #
    ################################################################################
    
    # This correpsonds to SDK 04.01.00
    TI_SGX_UM_VERSION = cf8cd620e96c9741bfcbe7f07c95328fe2d6ece9
    TI_SGX_UM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git
    TI_SGX_UM_LICENSE = TI TSPA License
    TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc
    TI_SGX_UM_INSTALL_STAGING = YES
    TI_SGX_UM_MAKE_OPTS = TARGET_PRODUCT=ti335x
    
    # ti-sgx-um is a egl/gles provider only if libdrm is installed
    TI_SGX_UM_DEPENDENCIES = libdrm
    
    define TI_SGX_UM_INSTALL_STAGING_CMDS
    	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_UM_MAKE_OPTS) -C $(@D) DISCIMAGE=$(STAGING_DIR) install
    endef
    
    define TI_SGX_UM_INSTALL_TARGET_CMDS
    	$(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_UM_MAKE_OPTS) -C $(@D) DISCIMAGE=$(TARGET_DIR) install
    endef
    
    $(eval $(generic-package))

  • TI SDK libgbm.so

    readelf -Ws libgbm.so
    
    Symbol table '.dynsym' contains 62 entries:
       Num:    Value  Size Type    Bind   Vis      Ndx Name
         0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
         1: 00000c50     0 SECTION LOCAL  DEFAULT    9 
         2: 00011564     0 SECTION LOCAL  DEFAULT   17 
         3: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlopen
         4: 00000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.4 (2)
         5: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTable
         6: 00000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.4 (2)
         7: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_new_from_devnum@LIBUDEV_183 (3)
         8: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_get_devnode@LIBUDEV_183 (3)
         9: 00000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@GLIBC_2.4 (2)
        10: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_new@LIBUDEV_183 (3)
        11: 00000000     0 FUNC    GLOBAL DEFAULT  UND getenv@GLIBC_2.4 (2)
        12: 00000000     0 FUNC    GLOBAL DEFAULT  UND __fxstat@GLIBC_2.4 (2)
        13: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
        14: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_unref@LIBUDEV_183 (3)
        15: 00000000     0 FUNC    GLOBAL DEFAULT  UND fprintf@GLIBC_2.4 (2)
        16: 00000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.4 (4)
        17: 00000000     0 FUNC    GLOBAL DEFAULT  UND snprintf@GLIBC_2.4 (2)
        18: 00000000     0 FUNC    GLOBAL DEFAULT  UND __strdup@GLIBC_2.4 (2)
        19: 00000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.4 (2)
        20: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlerror
        21: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym
        22: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
        23: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_unref@LIBUDEV_183 (3)
        24: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
        25: 00011708     0 NOTYPE  GLOBAL DEFAULT   22 __bss_start__
        26: 000010f8    48 FUNC    GLOBAL DEFAULT   11 gbm_bo_destroy
        27: 00000f58     8 FUNC    GLOBAL DEFAULT   11 gbm_device_is_format_supported
        28: 00000f7c   284 FUNC    GLOBAL DEFAULT   11 _gbm_mesa_get_device
        29: 000010c4    12 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_fd
        30: 00000f60    28 FUNC    GLOBAL DEFAULT   11 gbm_device_destroy
        31: 00011708     0 NOTYPE  GLOBAL DEFAULT   22 __bss_start
        32: 00001278   228 FUNC    GLOBAL DEFAULT   11 _gbm_create_device
        33: 00011750     0 NOTYPE  GLOBAL DEFAULT   22 __bss_end__
        34: 0000135c   164 FUNC    GLOBAL DEFAULT   11 _gbm_udev_device_new_from_fd
        35: 00001190    12 FUNC    GLOBAL DEFAULT   11 gbm_surface_has_free_buffers
        36: 00000e54   244 FUNC    GLOBAL DEFAULT   11 gbm_create_device
        37: 000010a0     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_height
        38: 000010b8    12 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_handle
        39: 000010a8     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_stride
        40: 000010dc     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_device
        41: 000010f0     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_user_data
        42: 0000116c    12 FUNC    GLOBAL DEFAULT   11 gbm_surface_destroy
        43: 00011708     0 NOTYPE  GLOBAL DEFAULT   21 _edata
        44: 00001164     8 FUNC    GLOBAL DEFAULT   11 gbm_surface_create
        45: 000010b0     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_format
        46: 00001460     0 FUNC    GLOBAL DEFAULT   12 _fini
        47: 00001454    12 FUNC    GLOBAL DEFAULT   11 _gbm_log
        48: 00000c50     0 FUNC    GLOBAL DEFAULT    9 _init
        49: 00001400    84 FUNC    GLOBAL DEFAULT   11 _gbm_fd_get_device_name
        50: 00001184    12 FUNC    GLOBAL DEFAULT   11 gbm_surface_release_buffer
        51: 00011750     0 NOTYPE  GLOBAL DEFAULT   22 _bss_end__
        52: 00001098     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_get_width
        53: 00011750     0 NOTYPE  GLOBAL DEFAULT   22 _end
        54: 00001178    12 FUNC    GLOBAL DEFAULT   11 gbm_surface_lock_front_buffer
        55: 000010e4    12 FUNC    GLOBAL DEFAULT   11 gbm_bo_set_user_data
        56: 00011750     0 NOTYPE  GLOBAL DEFAULT   22 __end__
        57: 00001128    52 FUNC    GLOBAL DEFAULT   11 gbm_bo_create
        58: 00000f50     8 FUNC    GLOBAL DEFAULT   11 gbm_device_get_backend_name
        59: 000010d0    12 FUNC    GLOBAL DEFAULT   11 gbm_bo_write
        60: 00000f48     8 FUNC    GLOBAL DEFAULT   11 gbm_device_get_fd
        61: 0000115c     8 FUNC    GLOBAL DEFAULT   11 gbm_bo_import
    

    buildroot libgbm.so

    readelf -Ws libgbm.so
    
    Symbol table '.dynsym' contains 64 entries:
       Num:    Value  Size Type    Bind   Vis      Ndx Name
         0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
         1: 00000c90     0 SECTION LOCAL  DEFAULT    8 
         2: 00011ef0     0 SECTION LOCAL  DEFAULT   16 
         3: 00000000     0 FUNC    GLOBAL DEFAULT  UND gnu_dev_major@GLIBC_2.4 (2)
         4: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlopen
         5: 00000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.4 (2)
         6: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTable
         7: 00012084     0 NOTYPE  GLOBAL DEFAULT   21 __bss_start__
         8: 00000000     0 FUNC    GLOBAL DEFAULT  UND gnu_dev_minor@GLIBC_2.4 (2)
         9: 00001224    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_destroy
        10: 0000121c     8 FUNC    GLOBAL DEFAULT   10 gbm_surface_create
        11: 0000119c    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_set_user_data
        12: 00000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.4 (2)
        13: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 _bss_end__
        14: 00012084     0 NOTYPE  GLOBAL DEFAULT   20 _edata
        15: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_new_from_devnum@LIBUDEV_183 (3)
        16: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_get_devnode@LIBUDEV_183 (3)
        17: 000014e8     0 FUNC    GLOBAL DEFAULT   11 _fini
        18: 00001194     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_device
        19: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 __bss_end__
        20: 00001214     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_import
        21: 00000000     0 FUNC    GLOBAL DEFAULT  UND strdup@GLIBC_2.4 (2)
        22: 0000131c   192 FUNC    GLOBAL DEFAULT   10 _gbm_create_device
        23: 00001168     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_format
        24: 000013dc   156 FUNC    GLOBAL DEFAULT   10 _gbm_udev_device_new_from_fd
        25: 00001038     8 FUNC    GLOBAL DEFAULT   10 gbm_device_get_fd
        26: 00001050    28 FUNC    GLOBAL DEFAULT   10 gbm_device_destroy
        27: 00001248    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_has_free_buffers
        28: 00000000     0 FUNC    GLOBAL DEFAULT  UND __fxstat64@GLIBC_2.4 (2)
        29: 00000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@GLIBC_2.4 (2)
        30: 00001230    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_lock_front_buffer
        31: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_new@LIBUDEV_183 (3)
        32: 00000f58   224 FUNC    GLOBAL DEFAULT   10 gbm_create_device
        33: 000011b0    48 FUNC    GLOBAL DEFAULT   10 gbm_bo_destroy
        34: 00000000     0 FUNC    GLOBAL DEFAULT  UND getenv@GLIBC_2.4 (2)
        35: 00001170    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_handle
        36: 0000123c    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_release_buffer
        37: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
        38: 00001158     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_height
        39: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_unref@LIBUDEV_183 (3)
        40: 00001478    84 FUNC    GLOBAL DEFAULT   10 _gbm_fd_get_device_name
        41: 0000106c   228 FUNC    GLOBAL DEFAULT   10 _gbm_mesa_get_device
        42: 00000000     0 FUNC    GLOBAL DEFAULT  UND fprintf@GLIBC_2.4 (2)
        43: 000014cc    12 FUNC    GLOBAL DEFAULT   10 _gbm_log
        44: 00001160     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_stride
        45: 00000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@GLIBC_2.4 (2)
        46: 00000000     0 FUNC    GLOBAL DEFAULT  UND snprintf@GLIBC_2.4 (2)
        47: 00000000     0 FUNC    GLOBAL DEFAULT  UND memset@GLIBC_2.4 (2)
        48: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 _end
        49: 00001150     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_width
        50: 0000117c    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_fd
        51: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlerror
        52: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 __end__
        53: 00001188    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_write
        54: 00012084     0 NOTYPE  GLOBAL DEFAULT   21 __bss_start
        55: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym
        56: 000011a8     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_user_data
        57: 00001040     8 FUNC    GLOBAL DEFAULT   10 gbm_device_get_backend_name
        58: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
        59: 00001048     8 FUNC    GLOBAL DEFAULT   10 gbm_device_is_format_supported
        60: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_unref@LIBUDEV_183 (3)
        61: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
        62: 00000c90     0 FUNC    GLOBAL DEFAULT    8 _init
        63: 000011e0    52 FUNC    GLOBAL DEFAULT   10 gbm_bo_create
    
    Symbol table '.symtab' contains 154 entries:
       Num:    Value  Size Type    Bind   Vis      Ndx Name
         0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
         1: 000000d4     0 SECTION LOCAL  DEFAULT    1 
         2: 00000270     0 SECTION LOCAL  DEFAULT    2 
         3: 00000670     0 SECTION LOCAL  DEFAULT    3 
         4: 00000ab6     0 SECTION LOCAL  DEFAULT    4 
         5: 00000b38     0 SECTION LOCAL  DEFAULT    5 
         6: 00000b78     0 SECTION LOCAL  DEFAULT    6 
         7: 00000be0     0 SECTION LOCAL  DEFAULT    7 
         8: 00000c90     0 SECTION LOCAL  DEFAULT    8 
         9: 00000c9c     0 SECTION LOCAL  DEFAULT    9 
        10: 00000db8     0 SECTION LOCAL  DEFAULT   10 
        11: 000014e8     0 SECTION LOCAL  DEFAULT   11 
        12: 000014f0     0 SECTION LOCAL  DEFAULT   12 
        13: 000015d4     0 SECTION LOCAL  DEFAULT   13 
        14: 00011ee8     0 SECTION LOCAL  DEFAULT   14 
        15: 00011eec     0 SECTION LOCAL  DEFAULT   15 
        16: 00011ef0     0 SECTION LOCAL  DEFAULT   16 
        17: 00011ef4     0 SECTION LOCAL  DEFAULT   17 
        18: 00011f00     0 SECTION LOCAL  DEFAULT   18 
        19: 00012000     0 SECTION LOCAL  DEFAULT   19 
        20: 00012080     0 SECTION LOCAL  DEFAULT   20 
        21: 00012084     0 SECTION LOCAL  DEFAULT   21 
        22: 00000000     0 SECTION LOCAL  DEFAULT   22 
        23: 00000000     0 SECTION LOCAL  DEFAULT   23 
        24: 00000000     0 FILE    LOCAL  DEFAULT  ABS /home/kyle/Documents/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/crti.o
        25: 00000db8     0 NOTYPE  LOCAL  DEFAULT   10 $a
        26: 00000db8     0 FUNC    LOCAL  DEFAULT   10 call_weak_fn
        27: 00000dd4     0 NOTYPE  LOCAL  DEFAULT   10 $d
        28: 00000c90     0 NOTYPE  LOCAL  DEFAULT    8 $a
        29: 000014e8     0 NOTYPE  LOCAL  DEFAULT   11 $a
        30: 00000000     0 FILE    LOCAL  DEFAULT  ABS /home/kyle/Documents/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/crtn.o
        31: 00000c98     0 NOTYPE  LOCAL  DEFAULT    8 $a
        32: 000014ec     0 NOTYPE  LOCAL  DEFAULT   11 $a
        33: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
        34: 00011ef0     0 OBJECT  LOCAL  DEFAULT   16 __JCR_LIST__
        35: 00000ddc     0 NOTYPE  LOCAL  DEFAULT   10 $a
        36: 00000ddc     0 FUNC    LOCAL  DEFAULT   10 deregister_tm_clones
        37: 00000e2c     0 NOTYPE  LOCAL  DEFAULT   10 $d
        38: 00000e3c     0 NOTYPE  LOCAL  DEFAULT   10 $a
        39: 00000e3c     0 FUNC    LOCAL  DEFAULT   10 register_tm_clones
        40: 00000e90     0 NOTYPE  LOCAL  DEFAULT   10 $d
        41: 00012080     0 NOTYPE  LOCAL  DEFAULT   20 $d
        42: 00000ea0     0 NOTYPE  LOCAL  DEFAULT   10 $a
        43: 00000ea0     0 FUNC    LOCAL  DEFAULT   10 __do_global_dtors_aux
        44: 00000ef4     0 NOTYPE  LOCAL  DEFAULT   10 $d
        45: 00012084     1 OBJECT  LOCAL  DEFAULT   21 completed.9248
        46: 00011eec     0 NOTYPE  LOCAL  DEFAULT   15 $d
        47: 00011eec     0 OBJECT  LOCAL  DEFAULT   15 __do_global_dtors_aux_fini_array_entry
        48: 00000f08     0 NOTYPE  LOCAL  DEFAULT   10 $a
        49: 00000f08     0 FUNC    LOCAL  DEFAULT   10 frame_dummy
        50: 00000f4c     0 NOTYPE  LOCAL  DEFAULT   10 $d
        51: 00011ee8     0 NOTYPE  LOCAL  DEFAULT   14 $d
        52: 00011ee8     0 OBJECT  LOCAL  DEFAULT   14 __frame_dummy_init_array_entry
        53: 00012084     0 NOTYPE  LOCAL  DEFAULT   21 $d
        54: 00000000     0 FILE    LOCAL  DEFAULT  ABS gbm.c
        55: 00000f58     0 NOTYPE  LOCAL  DEFAULT   10 $a
        56: 00001028     0 NOTYPE  LOCAL  DEFAULT   10 $d
        57: 00001038     0 NOTYPE  LOCAL  DEFAULT   10 $a
        58: 00001148     0 NOTYPE  LOCAL  DEFAULT   10 $d
        59: 00001150     0 NOTYPE  LOCAL  DEFAULT   10 $a
        60: 00012088     0 NOTYPE  LOCAL  DEFAULT   21 $d
        61: 00012088     4 OBJECT  LOCAL  DEFAULT   21 device_num
        62: 0001208c    64 OBJECT  LOCAL  DEFAULT   21 devices
        63: 00000000     0 FILE    LOCAL  DEFAULT  ABS backend.c
        64: 00001254     0 NOTYPE  LOCAL  DEFAULT   10 $a
        65: 00001254   200 FUNC    LOCAL  DEFAULT   10 load_backend
        66: 00001300     0 NOTYPE  LOCAL  DEFAULT   10 $d
        67: 0000131c     0 NOTYPE  LOCAL  DEFAULT   10 $a
        68: 000013c8     0 NOTYPE  LOCAL  DEFAULT   10 $d
        69: 00011ef4     0 NOTYPE  LOCAL  DEFAULT   17 $d
        70: 00011ef4    12 OBJECT  LOCAL  DEFAULT   17 backends
        71: 00000000     0 FILE    LOCAL  DEFAULT  ABS common.c
        72: 000013dc     0 NOTYPE  LOCAL  DEFAULT   10 $a
        73: 00001468     0 NOTYPE  LOCAL  DEFAULT   10 $d
        74: 00001478     0 NOTYPE  LOCAL  DEFAULT   10 $a
        75: 00000000     0 FILE    LOCAL  DEFAULT  ABS fstat64.c
        76: 000014d8     0 NOTYPE  LOCAL  DEFAULT   10 $a
        77: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
        78: 000015d4     0 NOTYPE  LOCAL  DEFAULT   13 $d
        79: 000015d4     0 OBJECT  LOCAL  DEFAULT   13 __FRAME_END__
        80: 00011ef0     0 NOTYPE  LOCAL  DEFAULT   16 $d
        81: 00011ef0     0 OBJECT  LOCAL  DEFAULT   16 __JCR_END__
        82: 00000000     0 FILE    LOCAL  DEFAULT  ABS 
        83: 000014d8    16 FUNC    LOCAL  DEFAULT   10 fstat64
        84: 00012080     0 OBJECT  LOCAL  DEFAULT   20 __dso_handle
        85: 00011f00     0 OBJECT  LOCAL  DEFAULT  ABS _DYNAMIC
        86: 00012084     0 OBJECT  LOCAL  DEFAULT   20 __TMC_END__
        87: 00012000     0 OBJECT  LOCAL  DEFAULT  ABS _GLOBAL_OFFSET_TABLE_
        88: 000014f0     0 NOTYPE  LOCAL  DEFAULT   12 $d
        89: 0000158e     0 NOTYPE  LOCAL  DEFAULT   12 $d
        90: 00000c9c     0 NOTYPE  LOCAL  DEFAULT    9 $a
        91: 00000cac     0 NOTYPE  LOCAL  DEFAULT    9 $d
        92: 00000cb0     0 NOTYPE  LOCAL  DEFAULT    9 $a
        93: 00000000     0 FUNC    GLOBAL DEFAULT  UND gnu_dev_major@@GLIBC_2.4
        94: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlopen
        95: 00000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@@GLIBC_2.4
        96: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTable
        97: 00012084     0 NOTYPE  GLOBAL DEFAULT   21 __bss_start__
        98: 00000000     0 FUNC    GLOBAL DEFAULT  UND gnu_dev_minor@@GLIBC_2.4
        99: 00001224    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_destroy
       100: 0000121c     8 FUNC    GLOBAL DEFAULT   10 gbm_surface_create
       101: 0000119c    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_set_user_data
       102: 00000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@@GLIBC_2.4
       103: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 _bss_end__
       104: 00012084     0 NOTYPE  GLOBAL DEFAULT   20 _edata
       105: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_new_from_devnum@@LIBUDEV_183
       106: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_get_devnode@@LIBUDEV_183
       107: 000014e8     0 FUNC    GLOBAL DEFAULT   11 _fini
       108: 00001194     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_device
       109: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 __bss_end__
       110: 00001214     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_import
       111: 00000000     0 FUNC    GLOBAL DEFAULT  UND strdup@@GLIBC_2.4
       112: 0000131c   192 FUNC    GLOBAL DEFAULT   10 _gbm_create_device
       113: 00001168     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_format
       114: 000013dc   156 FUNC    GLOBAL DEFAULT   10 _gbm_udev_device_new_from_fd
       115: 00001038     8 FUNC    GLOBAL DEFAULT   10 gbm_device_get_fd
       116: 00001050    28 FUNC    GLOBAL DEFAULT   10 gbm_device_destroy
       117: 00001248    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_has_free_buffers
       118: 00000000     0 FUNC    GLOBAL DEFAULT  UND __fxstat64@@GLIBC_2.4
       119: 00000000     0 OBJECT  GLOBAL DEFAULT  UND stderr@@GLIBC_2.4
       120: 00001230    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_lock_front_buffer
       121: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_new@@LIBUDEV_183
       122: 00000f58   224 FUNC    GLOBAL DEFAULT   10 gbm_create_device
       123: 000011b0    48 FUNC    GLOBAL DEFAULT   10 gbm_bo_destroy
       124: 00000000     0 FUNC    GLOBAL DEFAULT  UND getenv@@GLIBC_2.4
       125: 00001170    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_handle
       126: 0000123c    12 FUNC    GLOBAL DEFAULT   10 gbm_surface_release_buffer
       127: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
       128: 00001158     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_height
       129: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_unref@@LIBUDEV_183
       130: 00001478    84 FUNC    GLOBAL DEFAULT   10 _gbm_fd_get_device_name
       131: 0000106c   228 FUNC    GLOBAL DEFAULT   10 _gbm_mesa_get_device
       132: 00000000     0 FUNC    GLOBAL DEFAULT  UND fprintf@@GLIBC_2.4
       133: 000014cc    12 FUNC    GLOBAL DEFAULT   10 _gbm_log
       134: 00001160     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_stride
       135: 00000000     0 FUNC    GLOBAL DEFAULT  UND __errno_location@@GLIBC_2.4
       136: 00000000     0 FUNC    GLOBAL DEFAULT  UND snprintf@@GLIBC_2.4
       137: 00000000     0 FUNC    GLOBAL DEFAULT  UND memset@@GLIBC_2.4
       138: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 _end
       139: 00001150     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_width
       140: 0000117c    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_fd
       141: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlerror
       142: 000120cc     0 NOTYPE  GLOBAL DEFAULT   21 __end__
       143: 00001188    12 FUNC    GLOBAL DEFAULT   10 gbm_bo_write
       144: 00012084     0 NOTYPE  GLOBAL DEFAULT   21 __bss_start
       145: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND dlsym
       146: 000011a8     8 FUNC    GLOBAL DEFAULT   10 gbm_bo_get_user_data
       147: 00001040     8 FUNC    GLOBAL DEFAULT   10 gbm_device_get_backend_name
       148: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
       149: 00001048     8 FUNC    GLOBAL DEFAULT   10 gbm_device_is_format_supported
       150: 00000000     0 FUNC    GLOBAL DEFAULT  UND udev_device_unref@@LIBUDEV_183
       151: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
       152: 00000c90     0 FUNC    GLOBAL DEFAULT    8 _init
       153: 000011e0    52 FUNC    GLOBAL DEFAULT   10 gbm_bo_create
    

  • I figured out the problem.

    My build environment was automatically adding the following compiler flags. Removing these fixed the problem.

    -D_LARGEFILE_SOURCE
    -D_LARGEFILE64_SOURCE
    -D_FILE_OFFSET_BITS=64