export PORTLIBS_PATH=$DEVKITPRO/portlibs
export PATH=$DEVKITARM/bin:$PORTLIBS_PATH/3ds/bin:$PORTLIBS_PATH/armv6k/bin:$PATH
export PKG_CONFIG=$PWD/arm-none-eabi-pkg-config
export CFLAGS="-march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -O3 -mword-relocations -ffunction-sections"
export CPPFLAGS="-I$PORTLIBS_PATH/armv6k/include"
export LDFLAGS="-L$PORTLIBS_PATH/armv6k/lib"
cd libpng-1.6.23
./configure --prefix=$PORTLIBS_PATH/armv6k --host=arm-none-eabi --disable-shared --enable-static
make && make install
running these commands personally in terminal result in the same output(i guess it should, Makefile already contain those)
checking png.h presence... yes
checking for png.h... yes
checking for png_write_row in -lpng... no
...
configure: WARNING: Couldn't find libpng -- you will not be able to build pdftohtml or pdftopng
...
/opt/devkitPro/portlibs/armv6k/lib/libfreetype.a(sfnt.o): In function `error_callback':
sfnt.c
.text.error_callback+0x8): undefined reference to `png_get_error_ptr'
sfnt.c
.text.error_callback+0x20): undefined reference to `png_set_longjmp_fn'
/opt/devkitPro/portlibs/armv6k/lib/libfreetype.a(sfnt.o): In function `Load_SBit_Png.isra.17':
sfnt.c
.text.Load_SBit_Png.isra.17+0xa0): undefined reference to `png_create_read_struct'
sfnt.c
.text.Load_SBit_Png.isra.17+0xb4): undefined reference to `png_create_info_struct'
sfnt.c
.text.Load_SBit_Png.isra.17+0xd0): undefined reference to `png_set_longjmp_fn'
sfnt.c
.text.Load_SBit_Png.isra.17+0xf4): undefined reference to `png_destroy_read_struct'
sfnt.c
.text.Load_SBit_Png.isra.17+0x118): undefined reference to `png_set_read_fn'
sfnt.c
.text.Load_SBit_Png.isra.17+0x124): undefined reference to `png_read_info'
sfnt.c
.text.Load_SBit_Png.isra.17+0x154): undefined reference to `png_get_IHDR'
sfnt.c
.text.Load_SBit_Png.isra.17+0x1e0): undefined reference to `png_destroy_read_struct'
sfnt.c
.text.Load_SBit_Png.isra.17+0x22c): undefined reference to `png_set_expand_gray_1_2_4_to_8'
sfnt.c
.text.Load_SBit_Png.isra.17+0x23c): undefined reference to `png_get_valid'
sfnt.c
.text.Load_SBit_Png.isra.17+0x278): undefined reference to `png_set_interlace_handling'
sfnt.c
.text.Load_SBit_Png.isra.17+0x288): undefined reference to `png_set_filler'
sfnt.c
.text.Load_SBit_Png.isra.17+0x294): undefined reference to `png_read_update_info'
sfnt.c
.text.Load_SBit_Png.isra.17+0x2c8): undefined reference to `png_get_IHDR'
sfnt.c
.text.Load_SBit_Png.isra.17+0x2f8): undefined reference to `png_set_read_user_transform_fn'
sfnt.c
.text.Load_SBit_Png.isra.17+0x380): undefined reference to `png_read_image'
sfnt.c
.text.Load_SBit_Png.isra.17+0x398): undefined reference to `png_read_end'
sfnt.c
.text.Load_SBit_Png.isra.17+0x3a4): undefined reference to `png_set_gray_to_rgb'
sfnt.c
.text.Load_SBit_Png.isra.17+0x3b0): undefined reference to `png_set_packing'
sfnt.c
.text.Load_SBit_Png.isra.17+0x3bc): undefined reference to `png_set_tRNS_to_alpha'
sfnt.c
.text.Load_SBit_Png.isra.17+0x3c8): undefined reference to `png_set_strip_16'
sfnt.c
.text.Load_SBit_Png.isra.17+0x3d8): undefined reference to `png_set_palette_to_rgb'
sfnt.c
.text.Load_SBit_Png.isra.17+0x408): undefined reference to `png_set_read_user_transform_fn'
/opt/devkitPro/portlibs/armv6k/lib/libfreetype.a(sfnt.o): In function `read_data_from_FT_Stream':
sfnt.c
.text.read_data_from_FT_Stream+0x10): undefined reference to `png_get_io_ptr'
sfnt.c
.text.read_data_from_FT_Stream+0x48): undefined reference to `png_get_error_ptr'
sfnt.c
.text.read_data_from_FT_Stream+0x5c): undefined reference to `png_error'
collect2: error: ld returned 1 exit status
--------------------- MERGED ---------------------------
$./configure --prefix=$PORTLIBS_PATH/armv6k --host=arm-none-eabi --disable-shared --enable-static >> configurelog.txt
configure: WARNING: using cross tools not prefixed with host triplet
configure: WARNING: not building timepng
configurelog.txt:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... arm-none-eabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-eabi-gcc accepts -g... yes
checking for arm-none-eabi-gcc option to accept ISO C89... none needed
checking whether arm-none-eabi-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of arm-none-eabi-gcc... gcc3
checking dependency style of arm-none-eabi-gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-none-eabi
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking how to print strings... printf
checking for ld used by arm-none-eabi-gcc... /opt/devkitPro/devkitARM/arm-none-eabi/bin/ld
checking if the linker (/opt/devkitPro/devkitARM/arm-none-eabi/bin/ld) is GNU ld... yes
checking how to run the C preprocessor... arm-none-eabi-gcc -E
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for BSD- or MS-compatible name lister (nm)... /opt/devkitPro/devkitARM/bin/arm-none-eabi-nm -B
checking the name lister (/opt/devkitPro/devkitARM/bin/arm-none-eabi-nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to arm-none-eabi format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/devkitPro/devkitARM/arm-none-eabi/bin/ld option to reload object files... -r
checking for arm-none-eabi-objdump... arm-none-eabi-objdump
checking how to recognize dependent libraries... unknown
checking for arm-none-eabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-none-eabi-ar... arm-none-eabi-ar
checking for archiver @FILE support... @
checking for arm-none-eabi-strip... (cached) arm-none-eabi-strip
checking for arm-none-eabi-ranlib... arm-none-eabi-ranlib
checking command to parse /opt/devkitPro/devkitARM/bin/arm-none-eabi-nm -B output from arm-none-eabi-gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for arm-none-eabi-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if arm-none-eabi-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-none-eabi-gcc option to produce PIC... -fPIC -DPIC
checking if arm-none-eabi-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-none-eabi-gcc static flag -static works... yes
checking if arm-none-eabi-gcc supports -c -o file.o... yes
checking if arm-none-eabi-gcc supports -c -o file.o... (cached) yes
checking whether the arm-none-eabi-gcc linker (/opt/devkitPro/devkitARM/arm-none-eabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking that AWK works... ok
checking if we need to force back C standard to C89... no
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for C/C++ restrict keyword... __restrict
checking for working strtod... no
checking for pow... no
checking for pow in -lm... yes
checking for memset... yes
checking for pow... (cached) no
checking for pow in -lm... (cached) yes
checking for clock_gettime... no
checking for zlibVersion in -lz... yes
checking for feenableexcept in -lm... no
checking for feenableexcept... no
checking if using Solaris linker... no
checking if libraries can be versioned... yes
checking for symbol prefix...
configure: pkgconfig directory is ${libdir}/pkgconfig
configure: Extra options for compiler:
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libpng.pc
config.status: creating libpng-config
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands