ThinPro 4.4 and linux-headers-3.8.13-hp

Hi. To connect Wi-Fi module needed linux-headers-3.8.13-hp. But they are not pre-installed. Where to find them?

Luis666, welcome to the forum.
I believe that you will get more response to your question if you start a thread here.  They know more about you product.
Please click the "Thumbs up + button" if I have helped you and click "Accept as Solution" if your problem is solved.
Signature:
HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
HP Photosmart 7520 AIO
++++++++++++++++++
**Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
Intelligence is God given; Wisdom is the sum of our mistakes!
I am not an HP employee.

Similar Messages

  • Pacman -Qdt and linux-headers

    I was looking to clean up my system after installing a bunch of packages, so I ran pacman -Qdt and it spit this out:
    pacman -Qdt wrote:[tyler@arch etc]$ pacman -Qdt
    compiz-bcop 0.8.8-2
    compizconfig-python 0.8.4-4
    git 1.8.1.2-1
    jshon 20121122-1
    libidl2 0.8.14-2
    libwnck 2.30.7-1
    linux-headers 3.7.5-1
    python-distribute 0.6.34-1
    I got curious when I saw the linux-headers 3.7.5-1, so I ran uname -a to see my kernel and it spit out:
    uname -a wrote:3.7.5-1-ARCH
    My questions are, why is that in the cleanup list if it is the version I use?  Will removing it be harmful?  Or was it just installed to compile the kernel?
    Last edited by defkult (2013-02-05 16:01:16)

    anonymous_user wrote:linux-headers is not required by the kernel. It is used when building a module such as nvidia, catalyst, virtualbox-modules, etc.
    So I should leave it installed for later updates, if I don't want to have to re-download it every time something updates.  Correct?

  • Linux and linux-headers packages

    Hi,
    shouldn't linux-headers package has linux as it's depency? Currently I must roll back to the old kernel and that's why I should also manually track linux-headers package. As I understand there is litte if not sense at all in having headers different to the currently running kernel. You cannot have several parallely linux-headers packages (in order to build modules for different kernel versions) anyway.
    I thought I'll ask here, before submitting a bug report.
    Regards
    Roman

    Actually, that's not right. I have three different sets of Linux headers for ck1-kx, lqx, and the default. Each time each of my kernels upgrade, I recompile the fglrx module against each one with their own headers. Looking in /lib/modules/ seems to ascertain this.
    Also, there is a chance that using default headers for a non-default kernel could result in wrong behavior or info. For instance, compiling the fglrx module against linux-headers for the ck1 kernel does not work. I'm guessing not having the dependency simply means that you're able building modules for a kernel you may not have? I can see where this might be useful for those hosting a module for others without requiring the use of the corresponding kernel.
    Last edited by computerquip (2012-01-29 16:12:07)

  • [SOLVED]When pacman is updating linux-headers and linux, catalyst-hook

    Hello-
    I wanted this to be out there on the web so that people could find it.  I'm not sure if this could be considered a 'bug' for catalyst hook or for.. something, or if it is expected behavior.
    I ran pacman -Suy on my system today, and ran into errors about catalyst hook failing.
    Closer inspection indicated that it was trying to build based on headers of the version of linux that had just been removed, but the new linux headers hadn't been installed yet (after the hooks ran, then the linux-headers were installed)
    If you see this error during an upgrade, to resolve the issue simply run mkinitcpio -p linux after the install completes.
    Below you can see log/errors/progression
    [dylan@shoparch ~]$ sudo pacman -Suy
    :: Synchronizing package databases...
    catalyst is up to date
    core 105.8 KiB 175K/s 00:01 [######################] 100%
    extra 1522.0 KiB 1221K/s 00:01 [######################] 100%
    community 2.0 MiB 1184K/s 00:02 [######################] 100%
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    Packages (11): chromium-31.0.1650.63-1 grub-1:2.00.1282.g5ae5c54-1
    gtk3-3.10.6-1 jasper-1.900.1-10 libpipeline-1.2.5-1
    libvpx-1.3.0-1 linux-3.12.3-1 linux-headers-3.12.3-1
    lua-5.2.3-1 opus-1.1-1 python2-setuptools-1.4.2-1
    Total Download Size: 99.26 MiB
    Total Installed Size: 314.59 MiB
    Net Upgrade Size: 4.49 MiB
    :: Proceed with installation? [Y/n] y
    :: Retrieving packages ...
    grub-1:2.00.1282.g5... 5.2 MiB 1438K/s 00:04 [######################] 100%
    libpipeline-1.2.5-1... 34.9 KiB 6.82M/s 00:00 [######################] 100%
    linux-3.12.3-1-x86_64 49.9 MiB 3.29M/s 00:15 [######################] 100%
    linux-headers-3.12.... 5.8 MiB 1890K/s 00:03 [######################] 100%
    opus-1.1-1-x86_64 175.2 KiB 1734K/s 00:00 [######################] 100%
    chromium-31.0.1650.... 29.0 MiB 2.66M/s 00:11 [######################] 100%
    gtk3-3.10.6-1-x86_64 7.9 MiB 2.97M/s 00:03 [######################] 100%
    jasper-1.900.1-10-x... 159.8 KiB 181K/s 00:01 [######################] 100%
    libvpx-1.3.0-1-x86_64 620.0 KiB 764K/s 00:01 [######################] 100%
    lua-5.2.3-1-x86_64 195.9 KiB 1555K/s 00:00 [######################] 100%
    python2-setuptools-... 331.9 KiB 1495K/s 00:00 [######################] 100%
    (11/11) checking keys in keyring [######################] 100%
    (11/11) checking package integrity [######################] 100%
    (11/11) loading package files [######################] 100%
    (11/11) checking for file conflicts [######################] 100%
    (11/11) checking available disk space [######################] 100%
    ( 1/11) upgrading opus [######################] 100%
    ( 2/11) upgrading chromium [######################] 100%
    ( 3/11) upgrading grub [######################] 100%
    ( 4/11) upgrading gtk3 [######################] 100%
    ( 5/11) upgrading jasper [######################] 100%
    New optional dependencies for jasper
    freeglut: for jiv support [installed]
    glu: for jiv support [installed]
    ( 6/11) upgrading libpipeline [######################] 100%
    ( 7/11) upgrading libvpx [######################] 100%
    ( 8/11) upgrading linux [######################] 100%
    >>> Updating module dependencies. Please wait ...
    >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> Starting build: 3.12.3-1-ARCH
    -> Running build hook: [base]
    -> Running build hook: [udev]
    -> Running build hook: [autodetect]
    -> Running build hook: [modconf]
    -> Running build hook: [block]
    -> Running build hook: [mdadm_udev]
    Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
    -> Running build hook: [filesystems]
    -> Running build hook: [keyboard]
    -> Running build hook: [fsck]
    -> Running build hook: [fglrx]
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Failed!!! Check out log: /var/log/catalyst-install.log
    - /usr/lib/modules/3.12.2-1-ARCH looks like unused, maybe remove it manualy?
    ==> Generating module dependencies
    ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    ==> Image generation successful
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> Starting build: 3.12.3-1-ARCH
    -> Running build hook: [base]
    -> Running build hook: [udev]
    -> Running build hook: [modconf]
    -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: aic94xx
    ==> WARNING: Possibly missing firmware for module: smsmdtv
    -> Running build hook: [mdadm_udev]
    Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
    -> Running build hook: [filesystems]
    -> Running build hook: [keyboard]
    -> Running build hook: [fsck]
    -> Running build hook: [fglrx]
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Failed!!! Check out log: /var/log/catalyst-install.log
    - /usr/lib/modules/3.12.2-1-ARCH looks like unused, maybe remove it manualy?
    ==> Generating module dependencies
    ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    ==> Image generation successful
    ( 9/11) upgrading linux-headers [######################] 100%
    (10/11) upgrading lua [######################] 100%
    (11/11) upgrading python2-setuptools [######################] 100%
    [dylan@shoparch ~]$ less /var/log/catalyst-install.log
    2013-12-08 10:51:04
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Kernel header files are absent: directory /usr/lib/modules/3.12.3-1-ARCH/build doesn't exist! Game over
    2013-12-08 10:51:12
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Kernel header files are absent: directory /usr/lib/modules/3.12.3-1-ARCH/build doesn't exist! Game over
    [dylan@shoparch ~]$ sudo mkinitcpio -p linux
    [sudo] password for dylan:
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> Starting build: 3.12.3-1-ARCH
    -> Running build hook: [base]
    -> Running build hook: [udev]
    -> Running build hook: [autodetect]
    -> Running build hook: [modconf]
    -> Running build hook: [block]
    -> Running build hook: [mdadm_udev]
    Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
    -> Running build hook: [filesystems]
    -> Running build hook: [keyboard]
    -> Running build hook: [fsck]
    -> Running build hook: [fglrx]
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Ok.
    ==> Generating module dependencies
    ==> Creating gzip initcpio image: /boot/initramfs-linux.img
    ==> Image generation successful
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> Starting build: 3.12.3-1-ARCH
    -> Running build hook: [base]
    -> Running build hook: [udev]
    -> Running build hook: [modconf]
    -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: aic94xx
    ==> WARNING: Possibly missing firmware for module: smsmdtv
    -> Running build hook: [mdadm_udev]
    Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays.
    -> Running build hook: [filesystems]
    -> Running build hook: [keyboard]
    -> Running build hook: [fsck]
    -> Running build hook: [fglrx]
    Building fglrx module for 3.12.3-1-ARCH kernel ...
    Ok.
    ==> Generating module dependencies
    ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
    ==> Image generation successful
    Last edited by thenextdon13 (2014-01-01 20:21:37)

    Karol-
    That thread doesn't seem to be closed, and the thread it points to doesn't appear to really have a solution either, unless i'm missing something.
    clfarron4;
    I have this service running, but was concerned by the error message that i wouldn't have gui (and would have to drag out my laptop to do troubleshooting) upon reboot.  Next time I will let it be and make sure the service works correctly
    That said, I _did_ fix the distrust (or in this case non-rememberance) by running mkinitcpio -p linux.  Initial post has this detail in it.
    [dylan@shoparch ~]$ sudo systemctl status catalyst-hook.service
    [sudo] password for dylan:
    catalyst-hook.service - Catalyst's fglrx kernel' module builder
    Loaded: loaded (/usr/lib/systemd/system/catalyst-hook.service; enabled)
    Active: active (exited) since Sun 2013-12-08 15:50:36 PST; 25min ago
    Process: 269 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
    Main PID: 269 (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/catalyst-hook.service
    Dec 08 15:50:36 shoparch systemd[1]: Started Catalyst's fglrx kernel' module builder.
    [dylan@shoparch ~]$

  • Glibc and linux-lts-headers

    Hi,
    I'm using linux lts in my archlinux installation, so I think I don't need linux-api-headers. Thing is glibc depends on linux-api-headers.
    Can I switch dependences to linux-lts-headers safely and replace glibc with a custom PKGBUILD from abs? That package is the only one stopping me to remove linux-api-headers.
    I'll appreciate your help.
    Thanks.

    really? I always thought linux-lts-headers and linux-api-headers are the same but for different kernels :-P.
    Thanks for clearing this up to me. I guess I won't need to modify anything then.
    Regards!
    Last edited by unformatt (2012-07-12 15:47:43)

  • [SOLVED]linux-headers upgrade fails with PGP signature error

    Whe trying to upgrade the linux kernel using:
    pacman -S linux linux-headers
    it fails with the following error:
    (2/2) checking package integrity                             [#################################] 100%
    error: linux: signature from "Tobias Powalowski <[email protected]>" is unknown trust
    error: linux-headers: signature from "Tobias Powalowski <[email protected]>" is invalid
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.
    I have tried deleting /etc/pacman.d/gnupg and the recreating it with
    pacman-key --init
    , I have also run
    pacman -Syy
    to make sure the repository is up to date.  I read the wiki post about time, but my ntp daemon is running, and I have confirmed that my time is exactly right.
    Last edited by MikeDacre (2013-04-01 23:32:27)

    Hi,
    Sorry, but that doesn't help me.  I can't find any reference in that post to this problem.  I get a similar issue when I try to upgrade mysql:
    >> sudo pacman -S mariadb libmariadbclient mariadb-clients 16:06 Mon 04-01-2013
    resolving dependencies...
    looking for inter-conflicts...
    :: libmariadbclient and libmysqlclient are in conflict. Remove libmysqlclient? [y/N] y
    :: mariadb-clients and mysql-clients are in conflict. Remove mysql-clients? [y/N] y
    :: mariadb and mysql are in conflict. Remove mysql? [y/N] y
    Targets (6): libmysqlclient-5.5.30-6 [removal] mysql-5.5.30-6 [removal]
    mysql-clients-5.5.30-6 [removal] libmariadbclient-5.5.30-2 mariadb-5.5.30-2
    mariadb-clients-5.5.30-2
    Total Download Size: 16.85 MiB
    Total Installed Size: 152.41 MiB
    Net Upgrade Size: 28.51 MiB
    Proceed with installation? [Y/n] y
    :: Retrieving packages from extra...
    libmariadbclient-5.5.30-2-x86_64 6.6 MiB 1479K/s 00:05 [#################################] 100%
    mariadb-clients-5.5.30-2-x86_64 871.8 KiB 421K/s 00:02 [#################################] 100%
    mariadb-5.5.30-2-x86_64 9.4 MiB 440K/s 00:22 [#################################] 100%
    (3/3) checking package integrity [#################################] 100%
    error: libmariadbclient: key "BBE43771487328A9" is unknown
    :: Import PGP key , "Bartlomiej Piotrowski <[email protected]>", created 2011-10-10? [Y/n] y
    error: key "Bartlomiej Piotrowski <[email protected]>" could not be imported
    error: mariadb-clients: key "BBE43771487328A9" is unknown
    :: Import PGP key 487328A9, "Bartlomiej Piotrowski <[email protected]>", created 2011-10-10? [Y/n] y
    (3/3) checking package integrity [#################################] 100%
    error: libmariadbclient: signature from "Bartlomiej Piotrowski <[email protected]>" is unknown trust
    error: mariadb-clients: signature from "Bartlomiej Piotrowski <[email protected]>" is unknown trust
    error: mariadb: signature from "Bartlomiej Piotrowski <[email protected]>" is unknown trust
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.

  • [Solved] nvidia-beta & linux headers

    Just installed nvidia-beta 310.14 & appears to be working fine.
    However, when i run:
    sudo pacman -R $(pacman -Qqdt)
    it offers to remove linux-headers 3.6.6-1.
    This seems like a very bad idea. As far as i know, they are in use:
    $ uname -a
    Linux archlinux 3.6.6-1-ARCH #1 SMP PREEMPT Mon Nov 5 11:57:22 CET 2012 x86_64 GNU/Linux
    Would someone kindly explain ?
    Last edited by flipper T (2012-11-12 20:29:38)

    It's required if you want to build kernel modules for example.
    If you don't want it to show up when doing "pacman -Qqd" just install it explicity.
    edit:  And take a look at the nvidia-beta PKGBUILD to see why it was installed.
    Last edited by loafer (2012-11-12 20:22:15)

  • Atheros ethernet, compat-drivers & linux-headers version mismatch

    I just installed a new mobo (GA-H77M-D3H) which has an atheros ar8161 ethernet chip.
    The old mobo had a realtek ethernet chip which worked fine (but the RAM didn't).
    Arch (and other distros) doesn't have drivers for the new atheros one (there's a bit of a fight over its support in the linux kernel).
    I see many posts on how to fix this, but the solution isn't working for me yet.
    The solution seems to be to use the compat-drivers package. However, I'm having trouble building it (I'm not that great at solving these things yet).
    I am downloading compat-drivers from: https://www.kernel.org/pub/linux/kernel … ts/stable/
    (From the unzipped source, I am using ./script/driver-select alx)
    The problem is compat-drivers needs linux headers for my current kernel, 3.7.10-1-ARCH, but the version on the arch download page is Arch is 3.8.3-2 and I don't know where to find an earlier version.
    The download link I use for linux-headers is: https://www.archlinux.org/packages/core … x-headers/
    Note: I'm downloading on another computer as the one with no ethernet has no ethernet.
    "uname -r" gives me:
    3.7.10-1-ARCH.
    And I can't update without ethernet.
    The build error message is:
    make: *** /lib/modules/3.7.10-1-ARCH/build: No such file or directory.  Stop.
    So, my questions are:
    1. Is there anywhere I can get linux-headers for 3.7.10-1-ARCH? (and would this be the right way?)
    2. Can I force make to pretend I'm using 3.8.3-2? would this have any chance of success?
    3. Is there another way to fix this?
    Thanks.
    PS: It took me about 10 minutes to get through the forum register "captcha" due to bugs and my laptop not having accurate US time... I see lots of complaints about it online, so please fix (a regular captcha is far harder to spam).

    This works for me:
    1. Get latest kernel 3.8.3-2
    2. wget https://www.kernel.org/pub/linux/kernel … -u.tar.bz2
    3. Use https://backports.wiki.kernel.org/index … at-drivers documentation, but simply:
    - tar jxvf compat-drivers-2013-03-15-u.tar.bz2
    -./scripts/driver-select alx
    - make
    - make install
    - modprobe alx
    verify with lsmod | grep -i alx, if module is loaded.
    Note:
    compat-drivers-3.8.3-2-snpu.tar.bz2 didn't work for me with latest kernel 3.8.3-2.

  • Linux-Headers no longer needed?

    I noticed a few kernel updates ago that linux-headers was no longer needed and could be removed! I did not remove it since I was not sure. I thought I would have read something here on the forums about it, but unless I missed it (which is possible) I don't see it being discussed.
    I also manually searched for packages I could remove that were not needed and had no dependencies a few times over the past few weeks, and sure enough it still shows its not needed.
    Can I remove it and why is it no longer needed?

    karol wrote:
    Are you sure you're not thinking about linux-api-headers? linux-headers were called kernel26-headers before linux 3 came.
    linux-headers are needed by only a few packages, linux-api-headers however are required by glibc so you you still do need to have them installed.
    This is what I am looking at:
    core/linux-headers 3.1.3-1
    Last edited by banshee28 (2011-11-30 02:51:12)

  • How to get linux-headers-3.6.4-1

    Hi forums,
    I have a new Arch install on an Asus G75VW that uses the x86_64 3.6.4-1 kernel. I've installed VMware Workstation by following the wiki, but when I run it it complains it can't find the kernel's C headers. I downloaded the "linux-headers" package but VMware Workstation doesn't accept it, which I assume is because the package gets "linux-headers-3.6.5-1" and VMware wants "linux-headers-3.6.4-1". Is this a correct assumption? What should my next step be?
    Thank you.

    Raynman wrote:The next step should be to update the rest of your system, in particular the kernel package, so that the versions match.
    Ok, thank you. I will review the wiki and do this.
    Raynman wrote:That is why people say you should always update before installing new software.
    I'm coming from Debian and the Arch Linux way of doing things is a bit different than what I'm used to. My first thought was I'd be able to download "linux-headers-3.6.4-1" through a package cache, but I haven't been able to find such a thing. Is the "linux-headers-3.6.4-1" package available at all, in an FTP or something?

  • 4500 and Linux Kickstart

    Hi all
    Since I changed to 4500 all my Linux kickstart install are having errors "some type of time out" the configuration is really straightforward, nothing strange.
    Any ideas?
    Thanks. 

    Actually, that's not right. I have three different sets of Linux headers for ck1-kx, lqx, and the default. Each time each of my kernels upgrade, I recompile the fglrx module against each one with their own headers. Looking in /lib/modules/ seems to ascertain this.
    Also, there is a chance that using default headers for a non-default kernel could result in wrong behavior or info. For instance, compiling the fglrx module against linux-headers for the ck1 kernel does not work. I'm guessing not having the dependency simply means that you're able building modules for a kernel you may not have? I can see where this might be useful for those hosting a module for others without requiring the use of the corresponding kernel.
    Last edited by computerquip (2012-01-29 16:12:07)

  • Question regarding Oracle and Linux on VMware

    Hello,
    I carefuly read the paper on Oracle and Linux on Your Own VMware and I'm missing a point.
    The paper explains how to start a cluster on a single host in a single Linux VM on VMware.
    So, there are 2 instances of Oracle 10g DB on the same Linux VM inside VMware. What does allow that?
    Is it possible to run 2 instances on any (single) Linux box, or is VMware required? If VMware is not required, why this complication in that paper? If VMware is required, what does it bring that make running 2 cluster instances on the same host possible?
    Many thanks for your help.

    userLynx wrote:
    I have an oracle database (10.2) and I have a query that needs to compare data on the Oracle database to data on a MS SQL server DB. I'm using a DB Link between the two databases.
    How would I compare the date fields?
    I have a table that has a date as one of the fields and I need to restrict the records where the date is equal to the date on SQL, however the formats are different:
    My query is as follows:
    SELECT mkt_css_name,
    pmv_rqst_corp_id,
    pmv_rqst_source,
    'G',
    pmv_css_acct_no,
    eq.start_date
    FROM power_move@cmdt,
    enroll_que@tcis eq,
    marketer@cmdt
    WHERE eq.css_account_number = pmv_css_acct_no
    AND eq.requestor_type = 'P'
    AND eq.status IN ('A','P','G','S')
    AND eq.marketer_id = mkt_seq_no
    AND pmv_service_type IN ('G','D')
    And Pmv_Gas_Mktr_No = Eq.Marketer_Id
    AND pmv_received_timestamp= eq.enroll_date ;
    The problem is that the date is stored in Oracle in the following format: DD-MON-YYYY and in SQL as 'YYYY-DD-MM HH:MI:SSSSSS'
    for example: Data in Oracle would be 27-JAN-2012 and in SQL as 2012-01-27 00:00:00.000
    I get an error when I compile.
    How do you reconcile the formats when the syntax is different between databases?
    Thanks, SeanDATE datatypes do NOT have any "format"
    DATE datatype is stored in internal binary notation.
    use TO_CHAR to display, present & compare the DATE datatypes

  • Why  difference in Solaris and Linux

    Hi,
    The following program is giving results diferently when I am executing using g++ compiler in Solaris and Linux.
    Why it is so.
    here is the code:
    #include <stdio.h>
    #include <string.h>
    #include <malloc.h>
    #include <stdlib.h>
    int main( void )
    size_t size;
    char *buf;
    if ( ( buf = (char *)malloc(10 *sizeof(char))) == NULL)
    exit (1);
    size = sizeof( buf );
    strcpy(buf, "HelloWorld");
    printf("\n Address is : %u String is : %s size : %d ", buf, buf,size);
    if (( buf = (char *) realloc(buf, sizeof(20))) == NULL)
    exit ( 1);
    *(buf+10) = 'A'; *(buf+11) = 'B'; *(buf+12) = '\0';
    printf("\n Address is : %u String is : %s\n", buf, buf);
    free( buf);
    exit( 0 );
    Solaris:
    Address is : 134160 String is : HelloWorld size : 4
    Address is : 135704 String is : HelloWor
    Linux:
    Address is : 134518824 String is : HelloWorld size : 4
    Address is : 134518824 String is : HelloWorldAB
    Thanks
    Venkat

    Hi,
    The following program is giving results diferently
    when I am executing using g++ compiler in Solaris
    and Linux.
    Why it is so.
    here is the code:
    #include <stdio.h>
    #include <string.h>
    #include <malloc.h>
    #include <stdlib.h>
    int main( void )
    size_t size;
    char *buf;
    if ( ( buf = (char *)malloc(10 *sizeof(char))) == NULL)
    exit (1);
    size = sizeof( buf );The size you get here is the size of buf, which is the size of a pointer, not the size of what buf points to. sizeof(*buf) would give you size of a char, the type (not the object) that buf points to.
    There is no portable way to find out the number of bytes allocated on the heap if you are give only a pointer to the memory. You have to remember the size some other way..
    strcpy(buf, "HelloWorld");A literal string consists of the characters in the string plus a terminating null, all of which are copied by strcpy. You allocated 10 chars for buf, but are writing 11 chars into it. At this point, the program has undefined behavior. Literally anything at all could happen, because you can't predict the effect of writing outside the bounds of allocated memory.
    printf("\n Address is : %u String is : %s size :
    e : %d ", buf, buf,size);
    if (( buf = (char *) realloc(buf, sizeof(20))) == NULL)The "sizeof" operator in this case is returning the size of the type of a literal 20, which is an int. If you want to allocate 20 bytes, you write 20, not sizeof(20).
    exit ( 1);
    *(buf+10) = 'A'; *(buf+11) = 'B'; *(buf+12) == '\0';SInce you can't count on buf having more than 4 bytes at this time, you are writing into unallocated memory, with undefined results.
    printf("\n Address is : %u String is : %s\n", buf, buf);
    free( buf);
    exit( 0 );
    Instead of asking why you get different results on different platforms, you should be asking why the program doesn't crash on all platforms. :-)
    You can avoid these problems with keeping track of allocating memory by using the C++ standard library instead of trying to manage low-level details yourself as in C code.
    The standard string class, for example, extends itself as needed, and ensures that heap memory is freed when the string object is deleted or goes out of scope. You don't need pointers, malloc, free, or sizeof to use C++ strings.

  • Personas suddenly not working Firefox 30, 31, 32 on Win 7 Pro x64 and Linux Mint 16 x64

    Personas which have been working for a long time suddenly quit working on Win 7 and Linux. I tried changing to a different persona to change the background for the top border of the window and it just goes to some odd color and the personas just don't show up. This has been with Firefox 30, 31, 32. The personas still work with Win XP Pro run as a virtual machine on Win 7 host or Win 8 host. I thought it was a Windows thing until I saw the same problem with Linux. Everything else seems normal so this isn't a real bad problem. It's just odd.

    Make sure that you do not run Firefox in permanent Private Browsing mode (Never remember history).
    *https://support.mozilla.org/kb/Private+Browsing
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history"
    *Deselect: [ ] "Always use Private Browsing mode"

  • Why keyboard and mouse right click not working in Solaris and Linux?

    Hi all,
    I have two problems:
    1) I am working on AWT/Swing application and its working fine in window enviornment,but while running on solaris and linux mouse right-click option window not poping up.
    2) Ctrl+c,Ctrl+v,Home and End keyboard key are not working in solaris and linux OS for same application.
    Pls provide me some solution for these problem.
    -Dinesh

    Hi Nik,
    Thanks for reply. I found some solution for the above problem.
    For mouse right click there was problem in my source code.I have not implemented the mousePressed() method
    In case of keyboard Home, End and arrow key working fine after exporting AWTUSE_TYPE4_PATCH=false; in solaris and linux
    But still Ctrl-c and Ctrl-v not working.
    I am using JDK1.5.0_07+Eclipse IDE 3.1
    -Dinesh

Maybe you are looking for

  • Trigger a process(IDOC) when Data in Z-table updated

    Hi All, I am working on an interface and the outbound IDOC from R/3 to XI needs to be triggered when a particular field value in a Z*table changes. So far I am able to trigger the IDOC from the calling Z*prog which updates this table, but I need some

  • When are you going to add a compatibilty view icon like Internet Explorer to view in an old web browser?

    When I use my Firefox browser to go into Facebook my page is all messed up.When I use IE it is not like that now because I used the compatibility view to go back to original home page in Facebook because it let use an old browser that way.They (Faceb

  • Can OCR'd text be edited?

    I'm using Acrobat 9 Pro, and working with a document, a TIFF file, that was converted to PDF and OCR'd in Acrobat. Now I need to edit some of the text using the TouchUp Text tool, but am not able to edit it. In previous versions I was able to edit OC

  • Narcoleptic iPod

    I have a iPod click wheel, 4th gen, 20 gig that has a unique problem. Recently (and I think only coincidently since the installation of iTunes 7.0 and update to 10.4.8) my iPod has been having narcoleptic fits. What will happen is that no matter how

  • Photoshop logo creation help for website !

    I want to ask how to increase the width of the font in photoshop so that it looks fatter and proper for a logo, if anyone can make this logo for me . My website desperately needs photoshop and image work which i 'm not able to do properly. if anyone